Learn to use phpMyAdmin based on Web database management tools.
If you use the right tools, the MySQL database management will be fairly simple. The MySQL command-line approach requires familiarity with MySQL knowledge, as well as the SQL language. Not only that, if the database has a large number of accesses, it can be quite difficult to read the data in the list.
Many GUI MySQL clients are currently present, the most outstanding of which are web-based phpmyadmin tools. This is a MySQL database at the front desk based on PHP tools. The disadvantage of phpMyAdmin is that you have to install it on your Web server, so if you don't have the right access, other users may be able to compromise your SQL data.
The phpMyAdmin installation process is very simple. Download phpMyAdmin from http://www.phpmyadmin.net/, and the current latest version is 2.6.4-PL3. Unzip the download file to the path you choose, such as/srv/www/domain.com/html/admin. Before you connect phpMyAdmin to the database, make sure that the phpMyAdmin is protected, which can be done by establishing an an. htaccess file:
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 the assumption that the path/srv/www/domain.com is not protected so the. htaccess file is outside the Web path (for example, DocumentRoot in Apache is/srv/www/domain.com/html). To create a/srv/www/domain.com/.htpasswd file using the HTPASSWD tool: 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 the phpMyAdmin. You will be able to edit the $cfg[' pmabsoluteuri ' keyword to point to the location installed in the server phpMyAdmin, and then edit the $cfg[' Servers ' array. To quickly build and run, and be able to edit all the databases on the server, you will need to provide the authority to prove:
$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 into http://www.domain.com/admin/phpMyAdmin-2.6.4-pl3/and access your MySQL data, and you can rename the path to phpmyadmin/for easier access.