MySQL用户授予的权限
参考:https://www.cnblogs.com/kerrycode/p/7423850.html
//设置全部ip访问方法一
use mysql; 使用mysql数据库
update user set host = '%' where user ='root';
flush privileges; //立即生效
//设置全部ip访问方法二
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges; //立即生效
//设置192.168.1.168访问方法一
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.168' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges; //立即生效
用户权限相关
mysql -h 主机名(ip) -u 用户名 -P 端口 -p
show databases;
create user 'everifyer'@'%' identifyed by 'everifyertzasd';
everifyer/everifyertzasd
show grants for everifytz
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON . TO everifytz
@`%` WITH GRANT OPTION;
ALTER USER 'encrypted_user'@'%' REQUIRE SSL;
select host, user from mysql.user;