进入mysql的解压缩目录cd D:\mysql-5.7.15-winx64\bin
起动mysql服务 net start mysql ;输入net stop mysql关闭MySQL服务
输入 mysql -u root -p 后回车键,密码为空,不输入,直接回车,即可登录MySQL
查看多少个数据库:注意 后面带s SHOW DATABASES;
#查看表
USE create;
SHOW TABLES;
#查看表中的列
SHOW COLUMNS FROM auth_user;
查询mysql数据库的user表,select * from user
SELECT子句顺序:
SELECT;FROM;WHERE(AND OR);GROUP BY;HAVING;ORDER BY;(DESC);LIMIT
INNER JOIN ... ON...
起动mysql服务 net start mysql ;输入net stop mysql关闭MySQL服务
输入 mysql -u root -p 后回车键,密码为空,不输入,直接回车,即可登录MySQL
查看多少个数据库:注意 后面带s SHOW DATABASES;
#查看表
USE create;
SHOW TABLES;
#查看表中的列
SHOW COLUMNS FROM auth_user;
查询mysql数据库的user表,select * from user
SELECT子句顺序:
SELECT;FROM;WHERE(AND OR);GROUP BY;HAVING;ORDER BY;(DESC);LIMIT
INNER JOIN ... ON...