接下来。装逼开始....
mysql选择数据库
示例1:命令行中使用sql命令选择数据库
root@7c6316b19d80:/# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 32
Server version: 5.6.51 MySQL Community Server (GPL)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| django-admin |
| mysql |
| performance_schema |
| testing |
+--------------------+
6 rows in set (0.00 sec)
mysql> use testing;
Database changed
mysql>
执行以上命令后,就已经成功选择了 testing 数据库,后续的操作中都会在 testing 数据库中执行。