mysql -u root -p
show databases;
select user,host from mysql.user;
select user,authentication_string from mysql.user;
show variables like "%password%";
select user,host,password_last_changed from mysql.user where account_locked='N';
select user,password_last_changed from mysql.user;
show global variables like '%validate_password%';
select user,authentication_string from mysql.user;
show variables like '%max_connect_errors%';
show global variables like '%connection_control%';
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'connect%';
show variables like '%timeout%';
show variables like '%have_ssl%';
show variables like '%have_openss%';
select * from mysql.user\G;
select user,host from mysql.user where user='root';
存储过程:select user,authentication_string,plugin from mysql.user;
存储加密如果plugin是mysql_native_password则是SHA1加密,如果是caching_sha2_password则是SHA256加密;
select * from mysql.user\G;
select * from mysql.db\G;
select * from mysql.tables_priv\G;
select * from mysql.columns_priv\G;
show global variables like '%audit%';
show global variables like '%general%';
show global variables like 'log_%';
select now();
ls -l /var/log/mysqld.log
sudo head -5 /var/log/mysqld.log
Show plugins;
show global variables like '%ssl%';
select version();