MySQL授权远程连接:grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘;
show global status; show variables like ‘max_connections‘; show variables like ‘%slow%‘; set global slow_query_log = ON; show variables like ‘%long_query_time%‘; set global long_query_time =5 // explain分析慢查询日志 more slow-query.log //profiling分析查询
程序连接池, 大量访问的可以缓存;
MySQL数据库有几个配置选项可以帮助及时捕获低效SQL语句;
find / -name mysqldumpslow