Remote Management of MySQL in Ubuntu

Source: Internet
Author: User
Our server uses the Ubuntu8 server version, which uses mysql as the server. However, every time we manage the database, we use SQL statements, which is very troublesome, especially when adding

Our server uses the server version of Ubuntu 8 and uses mysql as the server. However, every time we manage databases, we use SQL statements, which is very troublesome, especially when

Our server uses the server version of Ubuntu 8 and uses mysql as the server. However, every time we manage databases, we use SQL statements, which is very troublesome, especially when we add data, if there are ',; and other symbols in the added data, it will be more troublesome, and it will have to be changed.

Later, I tried to add a remote access user to mysql so that he could remotely connect to mysql using a graphical client. After many attempts, I could not connect to mysql, use the netstat-an | grep 3306 command to check whether port 3306 is open. It is found that it has been developed and has not been intercepted, but cannot be connected.

Finally, I used phpMyAdmin, which is a mysql management tool used in the php environment and has powerful functions. Because I chose to install php when installing the Ubuntu 8 server version system, I do not need to set all Php environments, so I downloaded phpMyAdmin on mysql.cn, put it in the/var/www/directory, which is the apache program directory. decompress the package and run it. Access it in a browser. If you find that you cannot log on, you need to set it easily:

You can log on to mysql using the following methods:

1. config -- directly write an account and password that can log on to mysql in the configuration file. As long as you browse the datamgr directory, you can directly use the mysql account that writes the configuration file to manage mysql. The feature is convenient, but the disadvantage is that there is no security.

2. http -- the authentication function of the web server will pop up an authentication window before browsing the datamgr directory. As long as the mysql account is correct, it can have access to the datamgr directory. This is safer, but you cannot use this function when configuring php Using cgi or fastcgi, Because cgi does not want the server to send some verification information variables.

3. cookie -- a verification window will pop out like http. However, this is not a Common Logon window written by php, but is not used for web Server Authentication. As long as the browser supports cookies, 21. all browsers in the world should support the basic functions of cookies. Therefore, we generally choose the cookie authentication method.

I have selected the cookie method and configured it as follows:

Config. default. php (under the phpMyAdmin root directory) corresponds

$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cookies'; (valid choices: config, http, HTTP, signon or cookie)
$ Cfg ['servers'] [$ I] ['user'] = 'root'; // MySQL user
$ Cfg ['servers'] [$ I] ['Password'] = ''; // MySQL password (only needed


Fill in all three items in config. Fill in "auth_type" in http as http. Fill in "encryption Private Key" in the cookie field and search for the configuration file.

$ Cfg ['blowfish _ secret'] = 'bowgooo ';


Blowfish_secret just fill in some characters.

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.