Skip to main content

New Page

(2006-09-07)

Previously, in MySQL

To create a user jsmith with password Secret15 and allow them to do anything with the database named accounts, connect to the database with mysql and issue the command:

mysql> grant all on accounts.* to jsmith@localhost identified by 'Secret15';
Update for Mysql 8 or something

(2023-05-09)

You can't indirectly create users through a grant any more.

mysql> create user mydbadmin@'%' identified by 'superSecretPasswordWord';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> grant all privileges on mydb.* to mydbadmin@'%';
Query OK, 0 rows affected (0.00 sec)