Linux Learning note 09-sqlyog link mysql configuration

Source: Internet
Author: User
Tags iptables

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.