Create a MySQL Database and User with terminal

Login mysql

mysql -u root -p

Create Database name. Example database name: wordpress

CREATE DATABASE wordpress;

Create username. Example username: wordpressuser and Password: password

CREATE USER [email protected] IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO [email protected];
FLUSH PRIVILEGES;
exit

Leave a Reply