EN
MySQL / cmd - most useful commands
0 points
In this article, we would like to show you the most useful cmd commands for MySQL.
Quick solution:
xxxxxxxxxx
1
mysql -u root -p
Full command:
xxxxxxxxxx
1
mysql --user=<username> --password=<password>
Note:
If you didn't specify password during mysql installation use the following command:
xxxxxxxxxx
1mysql --user=root --password=
Quick solution:
xxxxxxxxxx
1
SHOW databases;
Quick solution:
xxxxxxxxxx
1
CREATE DATABASE database_name;
xxxxxxxxxx
1
DROP DATABASE database_name;
Quick solution:
xxxxxxxxxx
1
USE database_name;
Note:
To switch database simply use the above command with a different
database_name
.
Quick solution:
xxxxxxxxxx
1
SHOW tables;
Quick solution:
xxxxxxxxxx
1
CREATE TABLE table_name;
xxxxxxxxxx
1
DROP TABLE table_name;