How to Create MYSQL Database in SSH

Login Database.

mysql -u root mysql -p

Create Database.

CREATE DATABASE dbname;

Create Database User.

CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'password';

Give permission for dbname on db user.

GRANT ALL PRIVILEGES ON dbname.* TO 'dbuser'@'localhost';

Notice changes and reload the grant tables immediately.

FLUSH PRIVILEGES;

0 0 votes
Article Rating
Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback

[…] 1- Install MySQL database on Centos ( I promise add this document ASAP 🙂 ) 2- How to Create MYSQL Database in SSH […]

1
0
Would love your thoughts, please comment.x
()
x