First, install mysql before installing phpmyadmin. In fact, the lamp environment is the prerequisite for installing phpmyadmin. Here we only introduce the installation method of mysql under yum. (Note: the installation process can only be run with the root permission)
After installation, enter service mysqld start to start mysql.
The specific mysql extension installation and initial password settings are not described here. The focus is on phpmyadmin installation.
The procedure is as follows,
(1) enter the root directory
Phpmyadmin manages mysql through a graphical interface. Therefore, we can access mysql through a browser. What is the default root directory in linux? The answer is:/var/www/html/
Therefore, Step 1: Go to this directory:
Cd/var/www/html/
(2) Download and install phpmyadmin
Note that some yum updates do not contain phpmyadmin. In fact, using yum install phpmyadmin is invalid. In this case, we will install phpmyadmin manually.
First Download The phpmyadmin installation package: wget https://files.phpmyadmin.net/phpMyAdmin/4.4.14/phpMyAdmin-4.4.14-all-languages.zip
Here we download version 4.4.14. Wait until the download is complete.
(3) decompress the package.
Unzip phpMyAdmin-4.4.14-all-languages.zip
Note that the command will change due to different compression formats.
(4) rename
For ease of access, change the file name to phpmyadmin.
Music phpMyAdmin-4.4.14-all-languages.zip phpmyadmin
It is worth noting that the mv command is used not only to move files, but also to rename files.
(5) enter this folder
Cd phpmyadmin
Copy the sample configuration file.
Cp config. sample. inc. php config. inc. php
(6) The key step is to restart the previously installed apache and mysql
Service httpd restart
Service mysqld restart
Now you can access your PHPMYADMIN!
You can use your phpmyadmin through http: // localhost/phpmyadmin.