Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Privileges PHP/MySQL Web

Status
Not open for further replies.

ITY

IS-IT--Management
Nov 8, 2002
6
0
0
US
MySQL/PHP Mac OS X. What privileges do I need to set-up for a "user" who will be ANY web client trying to create/modify records in a MySQL database. I thought I'd tried everything, but I can't have becasue I still get an "access denied" unless the user is root. (yes, this DB will need to be secure).

via phpMyAdmin:
Database-specific privileges: "the_database_in question"
Data, all. Structure, none. Admin, none.
Table specific Privileges, none.

Hope this isn't too "Duh!"

Many Thanks

ITY

 
Hi

insert into user values ('%','USER NAME', password('PASSWORD'),'Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y');

If the user will only be allowed to Select, Insert and Update, change all Y's to N's (except the 1st 3)

The reload your priviliges by typing 'mysqladmin flush-privileges' on your command line.

Hope this helps.

You can tighten this to quite and extent. Depends on your requirements.
Replace the 1st value ...('%', ) to the name of your web server is you want only the web server to access the database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top