Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, 23 January 2014

Create MySQL database via SSH


We can create MySQL databases  through two ways :

phpmyadmin 
or 
 through the SSH command line
how to create a MySQL database with SSH command

1) First log in to mysql with your user name (change if not root). You will be prompted for a password.
mysql  -p
2)  create the database with a unique name
CREATE DATABASE <new_database>;

3) If you want to give the other_user all the privileges, type the command:
GRANT ALL PRIVILEGES ON <new_database.>* to other_user@localhost;
4)Then, type:

flush privileges;

5) Now the other user can log in and access the database with the command

mysql -u other_user -p'passwd' new_database

No comments:

Post a Comment