View Single Post
Old 01-21-2010, 10:44 AM   #11
mithrilG60
Feeling at Home
 
mithrilG60's Avatar
 
Join Date: Dec 2008
First Name: Geoff
Location: Vancouver, BC, Canada
Posts: 733
Trading: (2)
Cuaba
mithrilG60 will become famous soon enough
Default Re: Looking for a MySQL Guru

You need to determine the username and password that your app is using to access the database, you'll like find that in a config file in your PHP source. Once you know the username/password that needs to be granted access run the following:

Code:
CREATE USER '<apps_db_usernname>'@'localhost' IDENTIFIED BY 'some-password';
GRANT INSERT, SELECT, DELETE ON <app_db_name>.* TO '<apps_db_usernname>'@'localhost';
FLUSH PRIVILEGES;
The user will now have basic db operational capability. If this account also needs to be able to modify the tables and/or database you'll need to grant it additional permissions like ALTER, DROP, INDEX etc. If want to give it every operational privilege on the DB (not a good choice from a security perspective!!) replace the grant line with this one"

Code:
GRANT ALL PRIVILEGES ON <app_db_name>.* TO '<apps_db_usernname>'@'localhost';
mithrilG60 is offline   Reply With Quote