Jump to content

Errors with MySQL.


ChrisMartino

Recommended Posts

Hey there I'm having a strange error here.

 

So basically I'm running the following command:

 

It creates the MySQL user and MySQL database fine but the last permission grant fails.

 

	$mysql_connection = mysql_connect($remote_machine['Machine_IP'], $remote_machine['Machine_MySQL_Username'], $remote_machine['Machine_MySQL_Password']);

	mysql_query("CREATE DATABASE Server_{$server_id}", $mysql_connection);

	mysql_query("CREATE USER 'Server_{$server_id}'@'localhost' IDENTIFIED BY '{$database_password}'", $mysql_connection);

	mysql_query("GRANT ALL PRIVILEGES ON Server_{$server_id}.* TO Server_{$server_id}@localhost IDENTIFIED BY '{$database_password}';", $mysql_connection) or die(mysql_error());

 

But for some reason when I grant the privileges on the last command there I am prompted with the following error:

 

Access denied for user 'root'@'ciroc.x10premium.com' to database 'Server_25'

 

Any ideas? Thanks.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/225130-errors-with-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.