pavement

MySQL, Adding Users

From FreeBSDwiki
Revision as of 23:13, 15 August 2005 by Jimbo (Talk | contribs)
Jump to: navigation, search

To add new users to mysql use the following commands (if you haven't set a password for the mysql root user, leave off the -p):

oyabun# mysql --user=root mysql -p
password:
> GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'pass' WITH GRANT OPTION;

Nore: that command grants full privileges on ALL databases to "user@localhost", effectively creating a new mysql root user, which is usually not what you want. More frequently, you will want to GRANT ALL PRIVILEGES ON [[databasename]].* or something similar.

External Links

http://dev.mysql.com/doc/mysql/en/adding-users.html http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Adding_users.html

Personal tools