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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I set password on root user?

Status
Not open for further replies.

mrdance

Programmer
Apr 17, 2001
308
SE
how do I set password on root user?
how do I delete root and add antoher user with password?

Thanks
 
Setting the password initially for root on a Unix system:
/path/to/mysql/bin/mysqladmin -u root password 'thepasswd'

Deleting root ... dont. In fact, I would recommend actually never using root either. Root is the GOD account, and should only be used if 100% necessary.
What I do is set my root password and then store that information in a safe place (company vault). I then create an administrator account that has the ability to create and drop databases. I then create administrator accounts for each database that has the ability to create and drop tables in that database.

To add new users, I use the mysql_setpermission script.
/path/to/mysql/bin/mysql_setpermission -u dbadmin -p

Then follow the script to add new users/databases/permissions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top