Helpful Information
 
 
Category: Delphi Programming
Connecting to remote MySQL database

Hi,

I hope that someone can help me with this. I am trying to connect to a MySQL database on a Linux (RH 8) machine from Delphi 6 (running on my WinNT laptop). I installed the MySQL version that comes standard with RH8, so there is nothing special about that.

I have tried just about all the methods (myODBC, mysql.pas, TMysqlComponents, etc.) and just cannot connect to the database. As soon as I try to connect I get the following error message: Lost connection to MySQL server during query.

I'm really getting desperate and would appreciate any and all help.

Thanx

Seems not to be a delphi issue really. This problem occurs with a lot of languages and is actually a mysql config issue. See
http://www.mysql.com/doc/en/Gone_away.html for solutions.

Thanx for the help and the link. I managed to sort things out. In the end I just had to add my laptop's IP to my /etc/hosts file. Thanx again for the help!

Cheers

hello jalberts,
iam getting this kind of exception

java.sql.SQLException: Invalid authorization specification, message from server
: "Access denied for user: 'root@220.227.242.233' (Using password: YES)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1962)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1885)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:944)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
at com.mysql.jdbc.Connection.<init>(Connection.java:440)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:400)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Jdbc1.main(Jdbc1.java:17)


my cilent is java Application in windows 2000 server.But iam connecting to MYSql server database iam getting that kind of exception.

please help me.

regards
Ramesh

Ramesh

Your post is soooo of topic - This is a Delphi forum not a Java forum or a MySQL forum!!

Your username/password is invalid or the remote MySQL server is set up not to accept connections from your machine.

1) Verify that you are using the correct username/password
2) If you still cannot connect, contact your DBA to allow your user to connect from your hostname/ip.










privacy (GDPR)