Jump to content

[Solved] Access denied for user when connectiong remotely to MySQL database


Recommended Posts

Posted

Hi, i have the following Problem: I followed the instructions from https://wiki.helionet.org/MySQL_Databases#Connecting_Remotely and have added an IP Address (Host) in the remote MySQL Section and can connect with the database just fine.

 

But when i try to create a table, i get the follwoing error:

 

Error Code: 1044. Access denied for user 'user'@'*IP-Address*' to database 'database'
 
I have also tried to grant priviliges to the user, but same error and i have also tried it over phpMyAdmin Section, and there i get another error that user@localhost doesn't have access to the database. I haven't tried it with a wildcard...

 

Posted

Did you assign the user to the database in cPanel? You grant the rights as part of assigning the user to the database.

 

You do it at the bottom of the MySQL Databases page.

Posted

Could you try to add this % into the MySQL Remote and see if that works instead of the IP address?

 

Just removed the IP address that you added and replace with the % so it can allowed remote to all of the IP address to give access.

Posted

I removed the IP Address and inserted a '%', but i'm still unable to make any queries, except for a select statement. I am able to log in and make select statements, for everything else i'm gettin command or acces denied

Posted

One more to add from Wolstech's post, when you grant the rights as part of assigning the user to the database, did you checkmark "ALL PRIVILEGE"? That could be the reason why.

Posted

What is the database user, and the database you're trying to connect to?

the user is tmzafar_admin and the database is database_kd-ueberdachung

Posted

The grants, and the remote access all look correct. Have you tried dumping the database, dropping the database, and loading the data back in?

Posted

The grants, and the remote access all look correct. Have you tried dumping the database, dropping the database, and loading the data back in?

i have exported the tables which i created locally in an sql script and imported them through phpMyadmin, but i am unable to make a create table or insert into queries. It works on phpMyAdmin

Guest
This topic is now closed to further replies.
×
×
  • Create New...