#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    South Africa (Bloem)
    Posts
    2
    Rep Power
    0

    Unhappy 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
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,595
    Rep Power
    4207
    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.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    South Africa (Bloem)
    Posts
    2
    Rep Power
    0
    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
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    1
    Rep Power
    0

    How to connect from java(in win NT) to remote MYSQL Database Server on LINUX


    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
  8. #5
  9. My beer is empty....
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Location
    South Africa
    Posts
    73
    Rep Power
    13
    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.

IMN logo majestic logo threadwatch logo seochat tools logo