show databases; /*查看连接中的所有库名*/
show tables; /*查询库中的所有表*/
show columns from 表名; /*查询对应表的表结构*/
show create table 表名; /*查询对应表的建表语句*/
select TABLE_NAME from information_schema.`TABLES` where TABLE_SCHEMA = ‘库名'; /*查询对应库中的所有表*/
select * from information_schema.`COLUMNS` where table_name = ‘表名’ and TABLE_SCHEMA = ‘库名'; /*查询表的详细结构*/
UPDATE mysql.`user` SET Password = ‘密码’ WHERE user = ‘root'; /*修改mysql ROOT用户的密码*/
转载请注明:R&M » MYSQL常用命令-持续更新中