TMyConeccion connecting with user root

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ithilien
Posts: 33
Joined: Tue 27 Feb 2007 21:58

TMyConeccion connecting with user root

Post by Ithilien » Mon 06 Aug 2007 14:02

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.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 07 Aug 2007 09:42

Can you connect to this server from localhost (MyConnection1->Server = "localhost")?
If yes you should create 'root@%' user at the server.

Ithilien
Posts: 33
Joined: Tue 27 Feb 2007 21:58

Post by Ithilien » Wed 08 Aug 2007 09:46

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!

Post Reply