Page 1 of 1

TMyConeccion connecting with user root

Posted: Mon 06 Aug 2007 14:02
by Ithilien
Hello, i'm try to use the root user to connect to MySQL and the password is "root" too. OK. When i type:

Code: Select all

MyConnection1->Username = "root";
MyConnection1->Password = "root";
MyConnection1->Connect();
It can't connect to my database. However, using another user works nicely.
What's the problem? Thanks.

Posted: Tue 07 Aug 2007 09:42
by Ikar
Can you connect to this server from localhost (MyConnection1->Server = "localhost")?
If yes you should create 'root@%' user at the server.

Posted: Wed 08 Aug 2007 09:46
by Ithilien
Hi Ikar, thank you for reply!

My Problem was that i should wrote MyConnection1->Username = "'root'" instead MyConnection1->Username = "root".

Now it works nicely. Thanks again!