alaios
12-28-2003, 08:54 AM
Hi there my site uses phpMyAdmin....with mysql3.23.
I want to know if i can create users with privilleges. Yesterday i tried and i connected to the database but with the root password. Isn't little risky being connected to the database all the time as root?
If you would like to create and grant access to mysql users and dont want to always connect as root use the following:
at the MYSQL prompt (when you are logged in as root):
grant select, insert, update, delete, create, drop, alter on <dbname>.* to <user>@localhost identified by '<password>';
The items above in angled brackets (< and >) need to be replaced by actual names i.e.
I have a database called staff and I want to create a user called admin that has full access to the database:
grant select, insert, update, delete, create, drop, alter on staff.* to admin@localhost identified by 'securePass';
NOTE: The following "select, insert, update, delete, create, drop, alter" can be replaced by the key word 'all' and localhost can be substituted by the actual machine name your user will be connecting from.
I hope this helps...:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.