wiki'd

by JoKeru

MySQL create new DB and User

Setup

mysql> CREATE DATABASE pinky;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'pinky_user'@'localhost' IDENTIFIED BY 'p1nk1';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON pinky.* TO 'pinky_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)

Cleanup

mysql> DROP USER 'pinky_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> DROP DATABASE pinky;
Query OK, 0 rows affected (0.00 sec)

Comments