views:

165

answers:

3

Hello:

I am trying to connect to a MySQL database server (remote), but I can't. I am using an user with grant privileges (not root user). The error message is the following:

Can't obtain database list from the server. Access denied for user 'myuser'@'mypcname' (using password: YES)

"myuser" is an user I created with grant access. This user allows me to connect locally to every database. I am using the same software versions in both hosts: MySQL Server 4.1 (server) and EMS SQL Manager 2005 for MySQL, edition 3.7.0.1 (client).

The point is that I need to connect to the remote server using a different user, not root user. So, how to make the connection?

Thanks.

A: 

Look in connectionstrings.com to see if you have the right connection string used for MySql.

tommieb75
A: 

Make sure

  • that your MySQL server listens not only on localhost
  • your user can access the server from his location. Try 'myuser'@'%' in the GRANT command.
Juri Glass
+1  A: 

You have to make sure that the remote user account matches what the server will see coming in for a connection. For instance:

grant select on dbname.* to myname@mypc;

will not work if mypc is not resolvable on the server via DNS or the hosts file. In this case, you could try either using an IP, or a FQDN:

grant select on dbname.* to [email protected];
grant select on dbname.* to [email protected];
Marc B