mysql命令行
链接到数据库
mysql -h localhost -u root -p
Enter password:
# Welcome to the MySQL monitor. Commands end with ; or \g.
输入密码后,显示Wellcomme字样则表示链接数据库成功
查看数据库
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.01 sec)创建数据库