Home > Database > Mysql Tutorial > body text

linux环境中连接mysql速度慢_MySQL

WBOY
Release: 2016-06-01 13:10:11
Original
1386 people have browsed it

通过命令: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的连接速度快了很多

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!