1. 显示所有数据库:show databases;
2. 显示所有表:show tables;
3. 查看指定表的表结构:describe 表名;
4. 创建用户:CREATE USER 'cms'@'localhost' IDENTIFIED BY 'password';
5. 创建数据库:create database 数据库名称;
6. 给用户赋权限:grant all privileges on cms.* to 'cms'@'localhost' identified by 'password' with grant option;
7. 使用新用户登录:进入windows下mysql的安装目录bin下,使用mysql -u cms -p 数据库名(cms) -h 127.0.0.1(主机IP),提示输入密码后登录;