Go to the first, previous, next, last section, table of contents.


Adding new user privileges to MySQL

To add privileges to the MySQL database:

This assumes the current user has insert privileges for the mysql db table and reload privileges. The server (mysqld) has to be running. If it is not, start it with safe_mysqld --log &.

> mysql mysql
  insert into user values ('%','monty',password('something'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y') ;
  insert into user (host,user,password) values('localhost','dummy',") ;
  insert into user values ('%','admin',",'N','N','N','N','N','N','Y','N','Y','Y') ;
  quit
> mysqladmin reload

This makes three new users:

Monty
Full superuser, but must use password when using MySQL.
admin
Doesn't need a password but is only allowed to use mysqladmin reload, mysqladmin refresh and mysqladmin processlist. May be granted individual database privileges through table db.
dummy
Must be granted individual database privileges through table db.


Go to the first, previous, next, last section, table of contents.