python:mysql数据库选择和删除

接下来。装逼开始....
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 数据库中执行。
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
