Page 1 of 1

Connection to other Host

Posted: 09.12.2008, 13:52
by fighti
Hello,
at first, sorry for my bad english.
I have a problem with the TZConnection. I tried to connect to an other host with delphi7 and mysql 5. my settings are:

Code: Select all

con1.Database:='timetool';
con1.HostName:='192.168.1.10';
con1.User:='timetool';
con1.Password:='ttpwd';
con1.Protocol:='mysql-5';
but when I try to connect, I became this message:

Code: Select all

SQL Error: Access denied for user 'timetool'@'192.168.1.3' (using password: YES)
192.168.1.3 is my computer ip. Why I can't connect to an other host? thanks for any solutions.

Posted: 09.12.2008, 13:56
by gto
Hello there :)
Your problem is related to the MySQL configuration.

Take a look in here:
http://www.google.com/search?&q=mysql+remote+hosts

Zeos accepts connection to remote hosts without problems ;)

Posted: 09.12.2008, 13:58
by fighti
thank you for the answer. but the server allow the connections. my problem is, the TZConnection will connect to my host and not to the host I set with con1.HostName.

Posted: 09.12.2008, 14:54
by mdaems
Some mysql error grammar:
SQL Error: Access denied for user 'timetool'@'192.168.1.3' (using password: YES)
SQL Error : This is a message from the mysql server.
Access denied for user : the server denied acces
'timetool'@'192.168.1.3' (using password: YES) : user timetool tried to connect from host 192.168.1.3 and used a password.

I'm almost sure gto is right. Did you try to connect using the mysql command line prompt from your machine with the same credentials?
the command line : mysql -utimetool -pttpwd -h192.168.1.10 -Dtimetool

Have a look at the configuration in the mysql.hosts table and the mysql.db table. Read the manual on their exact meanings.

Mark

Posted: 09.12.2008, 14:59
by fighti
oohh.. I found the problem.. I used the wrong username :wallb: :wallb: :wallb:

thank you for the help!