Note that there are some explanatory texts on larger screens.

plurals
  1. POunable to access mysql database from wamp server online
    primarykey
    data
    text
    <p>i'm able to use phpmyadmin online using server ip address from myclient ..... i'm trying to retrive data from mysql using java code</p> <p>here is my code</p> <blockquote> <pre><code>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wamp; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * * @author user */ public class Wamp { /** * @param args the command line arguments */ // TODO code application logic here public static void main(String args[]) throws InstantiationException, IllegalAccessException { try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://serverip:3306/test","root",""); Statement stmt=con.createStatement(); // stmt.executeUpdate("Insert into student values(1,'abc','nagpur')"); ResultSet rs= stmt.executeQuery("Select names from sample where id=15"); rs.next(); String name= rs.getString("names"); System.out.println(name); System.out.println("DOne.."); //INSERT INTO `student`(`id`, `name`, `address`) VALUES (1,'amol','nagpur'); con.close(); } catch(ClassNotFoundException | SQLException e) { System.out.println("error"+e); } } } </code></pre> </blockquote> <p>i'm geting the following error :</p> <blockquote> <p>errorjava.sql.SQLException: null, message from server: "Host 'user-PC.Home' is not allowed to connect to this MySQL server"</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload