The first step
Open the Linux Command window and enter the super user.
command: [[email protected] ~]$ su
Password: Enter the Super user password
Step Two
Start the MySQL service
command: [[email protected] test]# service mysqld start
Starting mysqld: [OK]
Step Three
Go to MySQL
command: [[email protected] test]# mysql-u user name-p password
Fourth Step
Authorizing a user for remote access
Command:mysql> grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;
Query OK, 0 rows affected (0.02 sec)
mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)
Fifth Step
Open SQLyog
Sixth step
Setting information
Seventh Step
Click Connect Link Successful
Problems that may occur:
Can ' t connect to MYSQL server on "localhost" (10060)
Cause 1:
The firewall installed on the Testux host does not have port 3306 open
Solve:
Edit File/etc/sysconfig/iptables
Vi/etc/sysconfig/iptables
Plus this line.
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT
Finally reboot the firewall
/etc/rc.d/init.d/iptables restart
Cause 2:
Port number is not correct, view MySQL port number on Testux
command:mysql> show variables;
Question 2:
Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Cause: The user password is wrong, the MySQL password may not be set,
FIX: Modify the initial user password
# mysql-uroot-p
Enter Password: "Enter the original password"
Mysql>use MySQL;
mysql> Update user Set Password=password ("test") whereuser= ' root ';
mysql> flush Privileges;
Mysql> exit;
Tip: View TESTUXIP Address input command: ifconfig
Linux Learning note 09-sqlyog link mysql configuration