#查询当前MySQL本次启动后的运行统计时间
show global status like 'uptime';
#连接时间
show global variables like '%timeout';
#查看允许运行的sql最大文件大小
show VARIABLES like '%max_allowed_packet%';
#修改允许运行的sql最大文件大小
set global max_allowed_packet = 2*1024*1024*50
#设置mysql运行被任何ip连接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
#设置mysql运行被指定ip连接,例如(192.168.1.245)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.245' IDENTIFIED BY 'password' WITH GRANT OPTION;
网友评论