How to remotely connect to MySQL using MySQL-front?

Source: Internet
Author: User
Most of MySQL is installed on Linux, and MySQL-front is usually installed on our local machine. How can we use MySQL-front to connect MySQL on the remote Linux system? Using mysql-front to connect to a remote MySQL may cause some problems. Mostly error 1045: "Access denied for user duan@192.168.0.104, please check user name and password". What's going on? First, let's take a look at the user table of remote MySQL. Mysql> select host, user
-> From user;
+ --------------- + ------ +
| Host | User |
+ --------------- + ------ +
| Localhost | Root |
+ --------------- + ------ +
5 rows in SET (0.00 Sec) From this we can see that the root user only allows local (localhost) login. to remotely log on to the MySQL server, you need to create a user with normal permissions. The new user uses the following command: mysql> grant select, update, insert, delete on MAS. * To Duan @ localhost Identified by "123456"; this command indicates creating a user Duan and only allowing the user to log on locally (localhost) with the password 123456, it also grants the select, update, and insert permissions to all tables in the MAS database. We have a mas database here, so we use MAS. * to represent all the tables in the MAS database. If you want to operate all tables, including tables in the MySQL database, you can replace them with "*. *". Now the Duan user can log on to MySQL, but can only log on locally. To remotely log on to MYSQL as a Duan user, you also need the following command: Mysql> Update user set host = '%' where user = 'duany'; now we can view the MySQL management database: Mysql> select host, user
-> From user;
+ ----------- + ------ +
| Host | User |
+ ----------- + ------ +
| % | Duan |
| Localhost | root |
+ ----------- + ------ +
5 rows in SET (0.00 Sec) through the above operations, we know that the root user can also remotely log on to MySQL by changing the root host field to %, however, it is strongly not recommended to do so, otherwise it will bring serious security risks. Now, we can connect to our remote MySQL instance. Create a connection on MySQL-front, enter the connection name and IP address of the remote Linux instance, enter the user name Duan and password 123456, and select the connection port, the default value of MySQL is 3306. OK. The connection is successful. Congratulations !!! Note: I. Port 3306 must be enabled for the Linux firewall. II. I used mysql5.0 for my experiment. There is no problem at all, but mysql4.0 seems to be a problem. We can use the Duan user to log on to the database from any IP address. The Duan user's host field should be "% ". But I can't connect to MYSQL as long as I change the IP address. I don't know if it is a problem with MySQL or if I entered the command incorrectly. This issue needs to be further confirmed.

Note: I can see from another blog that you can fill in the IP address behind the server when establishing a connection. You can use the database to select MySql.

Sighs so many cool people on the Internet! Now it's time to read and write blogs to learn and communicate with each other. Install the IIS component in the morning.

Then the configuration is all confused. after searching on the internet, I will find a solution to the problem. I finally got it done, but I can't say it. however, I think it will solve the problem more quickly if a similar situation occurs again. maybe the experience is just like this. this process of exploration is itself a process of familiarity with things. if a problem occurs, the person next to him cannot immediately give advice.

 

 

From:Http://hi.baidu.com/zheng_hu1226/blog/item/a77f0711105dc015b8127bde.html

 

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.