MYSQL命令行

1、连接数据库mysql -u root -p 用户密码

2、查看所有zhidao数据库show databases;

3、选择数据库use databasename;

3、查看该数据库下所有表show tables;

4、查看表的区段

describe 表名;

5、查询表数据select  字段名 from 表名;

show processlist;
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'OFF';
SELECT * from mysql.general_log ORDER BY event_time DESC;
truncate table mysql.general_log;

 

posted @ 2020-05-14 15:56  Baby~She  阅读(38)  评论(0)    收藏  举报