Programming

How to create MySQL database table using terminal on Mac

seoca 2019. 3. 13. 03:21



Creating MySQL database through terminal 




When your root password is generated

/usr/local/mysql/bin/mysql -uroot -p

When the password is not generated

/usr/local/mysql/bin/mysql -uroot


Enter your mysql password 



To check your databases

SHOW DATABASES;

To create a database

CREATE DATABASE 'the name of database';

To check the created database

SHOW DATABASES;

To quit

QUIT;