Blogger Information
Blog 55
fans 0
comment 0
visits 59354
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
mysql 10038
南鸢离梦的博客
Original
714 people have browsed it

https://blog.csdn.net/CsdnGame/article/details/82109624   链接

use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
flush privileges;
quit
my.cnf文件配置问题 
service iptables restart
service mysql restart
将选项skip-networking注释掉(注:有的资料上说还要讲bind-address设置成127.0.0.1,我的配置文件中反正没看到这句话,也就没有设置。这个选项是用来设置可以进行外部访问Mysql的IP,有一个过滤的作用,也没有必要设置)。
vi /etc/my.cnf
保存退出 esc :wq
去看看防火墙有没有屏蔽掉3306端口。Centos系统的话,在 /etc/sysconfig/iptables 中,有没有这样一句话:
-A INPUT -p tcp -m tcp –dport 3306 -j ACCEPT没有就加上,或者后面的ACCEPT是DROP,将改成ACCEPT就行了
重启防火墙和mysql


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post