Hi,
I have a MySQL database on a local network server and
am having trouble connection via TMySQLConnection.
mycon := TMySQLConnection.create(nil);
mycon.database := 'mydb';
mycon.server := '192.168.7.18';
mycon.user := 'myuser';
mycon.password := 'mypass';
mycon.connect;
It gives me a EMySQLException (btw, which module is this from?)
saying "#42000Access denied for 'myuser'@'%' to database 'mydb'.
Using dbforge, I create a new connection using the following parameters:
Server : 192.168.7.18
User : myuser
Password : mypass
Database : mydb
And it connects ok.
Am I missing something?
Thanks
Ed
Access Denied
-
davidmarcus
- Posts: 50
- Joined: Tue 25 Jan 2005 11:22
- Location: Somerville, MA
- Contact:
-
AndreyZ
You should work with the EMyError exception class instead of EMySQLException. Here is an example:You can find more information about EMyError in the MyDAC documentation.
Code: Select all
try
MyConnection.Open;
except
on E: EMyError do
ShowMessage(E.Message);
end;