如何开启mysql 的侦听允许远程访问?
1.请在/etc/hosts.allow 添加以下行:
mysqld : ALL : ALLOW mysqld-max : ALL : ALLOW 2.需要编辑/etc/my.cnf
把skip-networking
注释掉: #skip-networking You can get the "error no. 2013: Lost Connection to mysql server during query
" message instantly whenever you try to connect to the MySQL daemon by TCP/IP. This is the TCP wrappers system (tcpd), which uses thehosts_access(5)
system to allow or disallow connections. # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless!
没有评论:
发表评论