1.登录Mysql
[登录数据库] >mysql -uroot -p12345678
2.查看数据库
[查询所有的数据库]> show databases;
[切换到指定的数据库]> user +数据库名称;
[查询所有用户]> select * from mysql.user;
3.查看数据库
[查询数据库中所有表名]
> select table_name from information_schema.tables where table_schema='[XXX]' and table_type='[XXXX]';
[查询指定数据库中指定表的所有字段名column_name ]
> select column_name from information_schema.columns where table_schema='[XXX]' and table_name='[XXXX]'
4.查询数据库表信息
[查看表引擎]>show engines;
[查看表引擎]>show create table 表名;
[查看表引擎]>show variables like '%storage_engine%';
5.修改密码
set password for 用户明@localhost = password(“新密码”)