Friday, October 31, 2014

cent os mysql can not worked for remote access

1.error

you need the SUPER privilege for this operation



fixed:



first ssh:
# service mysqld stop
# /usr/bin/mysqld_safe --skip-grant-tables

second ssh:
# mysql
mysql> use mysql;
mysql> select Host,User,Password from user;
mysql> update user set Host='%',Password=PASSWORD('your new password') where User='root' and Host='localhost' and Password='root3306';
mysql> flush privileges;
mysql> exit;
# /etc/init.d/mysqld restart

then first ssh can continue work.


2.error



10060 to login remote mysql,open firewall in linux:



# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 
# /sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
# /etc/rc.d/init.d/iptables save

cent os mysql can not worked for remote access

1.error

you need the SUPER privilege for this operation



fixed:



first ssh:
# service mysqld stop
# /usr/bin/mysqld_safe --skip-grant-tables

second ssh:
# mysql
mysql> use mysql;
mysql> select Host,User,Password from user;
mysql> update user set Host='%',Password=PASSWORD('your new password') where User='root' and Host='localhost' and Password='root3306';
mysql> flush privileges;
mysql> exit;
# /etc/init.d/mysqld restart

then first ssh can continue work.


2.error



10060 to login remote mysql,open firewall in linux:



# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 
# /sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
# /etc/rc.d/init.d/iptables save