MySQL Forums
Forum List  »  Newbie

Re: Can't connect to MySQL server on... pretty much anything
Posted by: Barry Galbraith
Date: February 18, 2015 11:12PM

When connecting to MySQL, it checks several things.
The username (and password to match) and the host you are connecting FROM.
Your user@host has to match an entry in the mysql user table.
If there's a match, it then checks which, if any database(s) you are allowed to see, and what commnads you are allowed to run against it.

That said, in a shared, webhosting environment, the webhost may not allow connections from anywhere outside their environment, so you could be SOL.
If they do allow it, then you have to enable the remote access (or get them to enable it, their call), and then enable a "user@your.remote.host" to access your database.
You should then be able to connect to mysql from your.remote.host as user, using the correct password for that user@host combination.

BTW. 127.0.0.1 is a synonym for localhost. It's the machine you are working on.
On the machine where mysql is running, you can use a mysql client directed to 127.0.0.1 to connect to mysql.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Can't connect to MySQL server on... pretty much anything
February 18, 2015 11:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.