PDA

View Full Version : users privilege


Aymen++
04-15-2004, 11:23 AM
i noticed that when i connect to MySQL with php using:
mysql_connect();
or:
mysql_connect("dbhost", "dbusername", "dbpassword");
always will be connected and the user can do anything like creating databases or delete.
how can i prevent it?
i just want the root user can do it.

firepages
04-15-2004, 04:10 PM
not a simple answer to give .. if you have phpmyadmin or similar , study the user,host & db tables in the `mysql` database which comes ready rolled with mysql , basically tou need to set up users , you can then limit users priviledges via the user table , you can further limit user priviledges to individual tables via the db table , most priviledges are self explanatory ... download the mysql manual which has a chapter all about user permissions etc.