This topic is locked
[SOLVED]

 Host '' is not allowed to connect to this MySQL server

1/30/2014 8:04:41 PM
PHPRunner General questions
R
RockyMtnHi author

I moved the application from one server to a different one. I have enabled remove MySQL connections; set the host user, password and database name to be the new ones in the dbcommon.php file. I made sure the database user has all privileges.
Now, when I try to login I get this error:
Warning: mysqli_connect(): (HY000/1130): Host 'server.royalrestrooms.com' is not allowed to connect to this MySQL server in /home/royalre2/public_html/LeadForms/include/dbconnection.my.mysqli.php on line 9

Fatal error: Host 'server.royalrestrooms.com' is not allowed to connect to this MySQL server in /home/royalre2/public_html/LeadForms/include/dbconnection.my.mysqli.php on line 12
Any ideas?

Admin 1/30/2014

It is what it says - host is not allowed to connect. When you setup privileges in MySQL make sure that user can connect from any host.
http://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address

R
RockyMtnHi author 2/10/2014



It is what it says - host is not allowed to connect. When you setup privileges in MySQL make sure that user can connect from any host.
http://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address


I am able to connect to the server with the same user and password when I use MySQL Administrator.
Any other ideas?

Admin 2/10/2014

This error message is not about username/password, this is about where you connecting from. MySQL allows you to specify different permissions for different hosts and apparently host server.royalrestrooms.com is not allowed to connect.

M
macalister 2/13/2014

Hi.
I had the same problem.
If you have cPanel, go to remote MySql and add the ip adress of the machine or server that contents the aplication.

A
Anapolis 2/20/2014

Rocky, when you say that you moved your PHPRunner application from "one server to a different one" you also mean that you duplicated all your PHPRunner application tables into your new hosting server's database, correct?
When you say "I am able to connect to the server with the same user and password when I use MySQL Administrator." it raises more questions.
When I use the hosting provider's User view of the database tables I am able to see a Master view first of my different databases. So I do not have one DB and tons of tables.
I make a separate database for each MySQL project. And although I may be able as an Admin to see all my databases and related tables I still need a separate Username and Password to access a particular database in my server . Each database in my account has its own Username and Password and SOMETIMES an individual database in my account might also refer to a differently named host server than another database I set up last week.
In fact, at least in PHPMyAdmin, the Username and Password I might be able to enter to gain access to my Admin view is NOT the same combination used by my applications in their connection settings.
And another question, just to make sure: You are not trying to access the PREVIOUS database server where you last had the same application before the hosting move are you?
And one last question in my mind: Perhaps your hosting provider does not honor mysqli_connect(...) as a connection method. As an experiment you might set the connection up to mysql_connect(...) and see what happens.