28 MySQL的使用
MySQL里的命令(最后需要加分号)查询库 show databases;
切换库 use mysql;mysql是库名
查看库里的表 show tables;
查看表里的字段 desc tb_name;
查看建表语句 show create table tb_name\G;
查看当前用户 select user();
查看当前使用的数据库 select databsase();
创建库 create database db1;
创建表 use db1; create table t1(id int(4), name char(40));
查看当前数据库版本 select version();
查看数据库状态 show status;
查看各参数 show variables; show variables like 'max_connect%';
修改参数 set global max_connect_errors=1000;
查看队列 show processlist; show full processlist;
详细的参考:https://blog.csdn.net/hello_zhou/article/details/51864566
页:
[1]