I am trying to run a script that needs one user with two databases.
My hosting company have told me that i need to create 2 databases and 1 stand-alone user in my hosting cp, then with phpmyadmin i need to grant access from the 2 databases to the stand-alone user.
I have been reading through the mysql website for ages and trying lots of things that don't seem to be working.
I am sure this would be very easy for someone who knows what they are doing! Is there anyone who could give me step by step instructions, or if they were feeling really generous i can give them access to the cp and they could do it for me!
Thanks in advance.
-Ben
Help with mysql - 2 databases with 1 user
Moderator: General Moderators
Re: Help with mysql - 2 databases with 1 user
[sql]GRANT ALL ON db1_name.* TO user_name@localhost IDENTIFIED BY 'user_password';[/sql]
[sql]GRANT ALL ON db2_name.* TO user_name@localhost IDENTIFIED BY 'user_password';[/sql]
[sql]GRANT ALL ON db2_name.* TO user_name@localhost IDENTIFIED BY 'user_password';[/sql]
There are 10 types of people in this world, those who understand binary and those who don't
Re: Help with mysql - 2 databases with 1 user
Thanks for the quick reply.
When i try this it comes up with the following error:
When i try this it comes up with the following error:
Code: Select all
#1046 - No database selectedRe: Help with mysql - 2 databases with 1 user
You should really read the basics of MySQL and SQL 
[sql]USE database_name;[/sql]
[sql]USE database_name;[/sql]
There are 10 types of people in this world, those who understand binary and those who don't
Re: Help with mysql - 2 databases with 1 user
Should this be used on the same line as the code above or separetly?
Where would you seggest i read about mysql?
Thanks for your help
Ben
Where would you seggest i read about mysql?
Thanks for your help
Ben