MYSQL常用命令-持续更新中

数据库知识 etdgcb123 2355℃ 0评论

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常用命令-持续更新中

喜欢 (0)or分享 (0)
发表我的评论
取消评论

表情

ICP号:京ICP备14044161号;联系我:rm@rmworking.com