How does phmyadmin remotely use the MYSQL database?

Source: Internet
Author: User

To allow mysql to be remotely connected and used, we need to simply enable the mysql remote connection permission. Below I will introduce several solutions for MYSQL remote connection.

You need to create a remote account in MYSQL on the server. By default, the root remote login fails.

1. Create a Remote Account

The Code is as follows: Copy code

Create user 'test' @ '192. 4.19.112 'identified by 'testpasswd ';
# Only 223.4.19.112 allowed

This IP login is allowed to be @ '%' 2. Set permissions

The Code is as follows: Copy code

Grant all PRIVILEGES on zjhy. * to 'test' @ '2017. 4.19.112 ';

3. Test it.

The Code is as follows: Copy code

Mysql-h224.4.7.77-uzjhy-p

4. The test is successful!

After the permission is set, you only need to configure phpmyadmin to connect to a remote MySQL database to manage the mysql database locally.

Introduction:
1. The phpmyadmin program is located on the server 192.168.1.1 with the access address http: // 192.168.1.1/phpmyadmin.
2. MySQL database server: 192.168.1.2, which already allows external database chains. MySQL database username: admin Password: 123456
3. Now we need to use http: // 192.168.1.1/phpmyadmin to manage the MySQL database above 192.168.1.2.
System O & M reminder: qihang01 original content is copyrighted. For more information, see the source and original article links.


The procedure is as follows:


1. Download phpmyadmin to the http: // 192.168.1.1/phpmyadmin directory
:, Find the version you need

For example:


2. Modify the config. default. php file in the libraries folder in the phpmyadmin directory.
1. Find $ cfg ['pmaabsoluteuri '] and set the value to http: // 192.168.1.1/phpmyadmin.
2. Search for $ cfg ['servers'] [$ I] ['host'] and set its value to 192.168.1.2.
3. Search for $ cfg ['servers'] [$ I] ['user'] and set the value to admin.
4. Search for $ cfg ['servers'] [$ I] ['Password'] and set the value to 123456.
3. After the configuration is complete, enter the database username: admin Password: 123456 through http: // 192.168.1.1/phpmyadmin to access the MySQL database above 192.168.1.2.

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.