cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution

Can't access MySQL database remotely

Hi, I've created a database and added a user with all permissions to it. Yet, when I use the IP of my website (along with port 3306) and the user credentials, the following is returned:

 

[28000][1045] Access denied for user '<accountname>'@'<someip>'

17 REPLIES 17
New

Re: Can't access MySQL database remotely

Hi @cmonBruh,

The ip of your database server is different than the website's one ... Have you tried this ?

Re: Can't access MySQL database remotely

Yes, I've read this, but I don't have the "Allow Direct Database Access" option anywhere, even though I have paid web hosting.

New

Re: Can't access MySQL database remotely

Hi @cmonBruh,

The note here says to get in touch with the guys at support. Are you using MySql Workbench?

Re: Can't access MySQL database remotely

I contacted the live chat and they said I have to call hosting support for some reason. I can't do that for now, I should be able to get this working without having to contact support.

 

I'm using phpStorm, but if the IP of my website is different than the IP I require, it won't work with other programs either. So I'd like to find out the IP I need to connect remotely with MySQL.

New

Re: Can't access MySQL database remotely

Hi @cmonBruh,

You should have the database server details into your dashboard. Are you using cPanel or Plesk?

Re: Can't access MySQL database remotely

I'm using cPanel. The only IP that is shown to me is the website's IP address.

New

Re: Can't access MySQL database remotely

Hi @cmonBruh,

Ok, right... when you access phpMyAdmin from your cPanel you should have there the info on the ip of your database server, on the right, at the top.

Re: Can't access MySQL database remotely

Yes, but it says "localhost:3306" sadly.

 

 

Now, another issue is occurring. I can't even get into my phpMyAdmin anymore, because every time I click "cPanel admin" it loads for a bit and then shows this:

 

New

Re: Can't access MySQL database remotely

Hi @cmonBruh Smiley Happy

It looks like you should really contact support over the phone then...

All the best

Re: Can't access MySQL database remotely

Thanks for the help at least. Sadly I'll need to wait until monday to fix this, because that's when the support phone lines are open. Very inconvenient, since I develop during the weekend.

New

Re: Can't access MySQL database remotely

Hi @cmonBruh,

They say the support is 24/7...

Solution

Re: Can't access MySQL database remotely

I just called the USA support number, which indeed was 24/7. They said they can only get the phpMyAdmin working from cPanel, and that they don't assist in connecting remotely to MySQL. However that doesn't seem quite right. Every developer uses remote MySQL connection, because no one is going to be coding PHP in a browser. I've tried phpStorm application, which says access denied when connecting to the MySQL remotely. Then, I've verified that it wasn't the application's fault by using a different application which gave the same error.

 

The support guy told me that the IP for remote MySQL connection is the same as the one I use for my hosting. This does make sense, since the connection doesn't fail, it just says access denied.

 

However, I just seem to have found the problem and thus solution by chance. I created another user with a password without special characters, and it works. So I'm guessing the special characters present some kind of problem.

New

Re: Can't access MySQL database remotely

Nice! Glad you solved it.

It is always a typo Smiley Happy

All the best.

Re: Can't access MySQL database remotely

The password was correct, but it doesn't seem to be supportive of special characters.

New

Re: Can't access MySQL database remotely

I always go for the autogenerated one. It is a bit dificult to remeber it but I can cope...hehehe... until 503 error comes up and then... I check everything.

Re: Can't access MySQL database remotely

Thanks I have been literally trying for hours with the password generator!

Re: Can't access MySQL database remotely

Confirming the issue with the password itself. I had a simple underscore and could not get connected until I read this thread. Changed the user password to remove the underscore and it immediately worked.