DelphiProgrammer
DelphiProgrammer

Reputation: 269

How to make a remote connection to a MySQL Database Server?

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.

Upvotes: 0

Views: 4789

Answers (4)

ashraf mohammed
ashraf mohammed

Reputation: 1350

 //EMS manager for mysql
 //this magnificient tool provide you with a way to connect to such a server that prevents access to the server from any remote file or any way from outside world
 //all you need is to have ftp access to the remote server
 //in c:/program files/Ems/  you will find file called emsproxy.php
 //it is what we call An (API) in programming world
 //upload that file to your remote server
 //then when you connect with EMS you select tunnling -->checkbox
 //it will ask you on the next step to provide a full url of your emsproxy.php
 //i tested that process myself. i did not have access to cpanel nieghter phpmyadmin
 //thanks

Upvotes: 0

Marc B
Marc B

Reputation: 360832

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];

Upvotes: 3

Juri Glass
Juri Glass

Reputation: 91703

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.

Upvotes: 0

t0mm13b
t0mm13b

Reputation: 34592

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

Upvotes: 0

Related Questions