Content of my /etc/my.cnf file.
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
port =3306
bind-address =*
#skip-networking
skip-name-resolve
max-connection=512
Code: Select all
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
I added mysql user for remote access like that.
Code: Select all
mysql> GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'PASSWORD';
Code: Select all
service mysqld restart
Code: Select all
$ mysql -u root –h myipadress –p
ERROR 2003 (HY000): Can't connect to MySQL server on 'myipadress' (113)
Please help me.