Install and use phpMyAdmin to manage MySQL databases

Source: Internet
Author: User
Learn to use phpMyAdmin, a Web-based database management tool. If appropriate tools are used, MySQL database management will be quite simple. To use the MySQL command line method, you must be familiar with MySQL knowledge and use the same SQL language. In addition, if the database has a large access volume, it will be quite difficult to read the data in the list. Many install GUIM phpmyadminmysql

Learn to use phpMyAdmin, a Web-based database management tool.

If appropriate tools are used, MySQL database management will be quite simple. To use the MySQL command line method, you must be familiar with MySQL knowledge and use the same SQL language. In addition, if the database has a large access volume, it will be quite difficult to read the data in the list.

There are currently many GUI MySQL client programs, the most outstanding of which is the Web-based phpMyAdmin tool. This is a PHP-based MySQL database front-end tool. The disadvantage of PhpMyAdmin is that it must be installed on your Web server. Therefore, if you do not have proper access permissions, other users may damage your SQL data.

The installation process of PhpMyAdmin is very simple. Download phpmyadminfrom http://www.phpmyadmin.net/and the latest version is 2.6.4-pl3. Decompress the downloaded file to the path you selected, such as/srv/www/domain.com/html/admin. Before you connect phpMyAdmin to the database, make sure that phpMyAdmin is protected. you can create an. htaccess file to complete the operation:



AuthUserFile /srv/www/domain.com/.htpasswd

AuthGroupFile /dev/null

AuthName adminAuthType basic



Order Deny,Allow

Deny From All

Allow From localhost

require user admin

satisfy any





The above code snippet makes it possible that the path/srv/www/domain.com is not protected, so the. htaccess file is outside the Web path (for example, the DocumentRoot in Apache is/srv/www/domain.com/html ). Use the htpasswd tool to create the/srv/www/domain.com/.htpasswdfile: create the/srv/www/domain.com/.htpasswd file using the htpasswd tool:



# htpasswd -cm /srv/www/domain.com/.htpasswd admin



Once you have provided the administrator password, you can edit the config. inc. php file containing phpMyAdmin. You can edit the $ cfg ['pmabsoluteuri'] keyword to point to the position of phpMyAdmin installed on the server, and then edit the $ cfg ['servers'] array. To quickly create and run databases and edit all the databases on the server, you must provide the following proof of permission:



$cfg['Servers'][$i]['host'] = 'localhost';

$cfg['Servers'][$i]['extension'] = 'mysql';

$cfg['Servers'][$i]['auth_type'] = 'config';

$cfg['Servers'][$i]['user'] = 'root';$cfg['Servers'][$i]['password'] = 'mysecretrootpass';



Now you can go to the ingress.

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.