Home >Database >Mysql Tutorial >linux环境中连接mysql速度慢_MySQL

linux环境中连接mysql速度慢_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:111419browse

通过命令:find / -name my.cnf查找到mysql配置文件my.cnf的存放路径
我的找到的路径为/etc/my.cnf
再通过命令:vi /etc/my.cnf进行编辑
找到[mysqld]并在其下方添加:skip-name-resolve (可提前通过命令grep -n '[mysqld]' /etc/my.cnf找到[mysqld]在文件my.cnf第几行;-n用以显示行号用)
按esc接着输入:wq保存更改并退出,
通过命令service mysqld restart重启mysql服务即可,之后会发现mysql的连接速度快了很多

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PDO链接mysql学习_MySQLNext article:MYSQL配置关键_MySQL