M
Marcelo
Dear all,
I am having a hard time connect mysql with Java.
I am using the code like this:
Connection db;
try {
db = DriverManager.getConnection("jdbc:mysql://localhost/project",
user, pass);
}
where project is my database.
There is no problem with the driver Class.forName("com.mysql.jdbc.Driver");
However, for some reason I get this error message:
java.sql.SQLException: null, message from server: "Host
'localhost.localdomain' is not allowed to connect to this MySQL server"
Should I specify a socket or something like that in order to reach a
connection to my localhost?
thanks for your help,
Marcelo
I am having a hard time connect mysql with Java.
I am using the code like this:
Connection db;
try {
db = DriverManager.getConnection("jdbc:mysql://localhost/project",
user, pass);
}
where project is my database.
There is no problem with the driver Class.forName("com.mysql.jdbc.Driver");
However, for some reason I get this error message:
java.sql.SQLException: null, message from server: "Host
'localhost.localdomain' is not allowed to connect to this MySQL server"
Should I specify a socket or something like that in order to reach a
connection to my localhost?
thanks for your help,
Marcelo