我是mysql新手。我想使用我想要的任何IP连接到mysql服务器。我读到我要做的就是将mybind.address = 0.0.0.0添加到my.cnf文件中。那就是我所做的。我重新启动了mysql服务器,然后从命令行对其进行了测试。
mysql -uroot -p'*password*' -h 127.0.0.1 --> Works
mysql -uroot -p'*password*' -h 192.168.2.4 (local ip address) --->
ERROR 1045 (28000): Access denied for user 'root'@'mguru.lnx.gr' (using password: YES)
您可以在my.cnf文件中的mysqld部分的下面看到
[mysqld]
user = mysql
port=3306
socket = /opt/lampp/var/mysql/mysql.sock
skip-external-locking
key_buffer = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
plugin_dir = /opt/lampp/lib/mysql/plugin/
#skip-networking
bind-address=0.0.0.0
预先谢谢你,尼科斯
对不起,我误读了整个问题,就我所知无法使用多个IP而言,也许这可以为您提供帮助,但实际上无论如何都不需要。请问您为什么要这样做?cyberciti.biz/faq/…–杰里德普
—
Jeredepp)2014年