First go to the official website to download the phpMyAdmin source code:
https://www.phpmyadmin.net/downloads/
The file after downloading is phpMyAdmin-4.8.2-all-languages.tar.gz.
Extract it:
tar xvf phpMyAdmin-4.8.2-all-languages.tar.gz
View the decompressed file:
Then copy this folder to a path accessible to the apache server, and re- Name it phpmyadmin:
cp -rf phpMyAdmin-4.8.2-all-languages /var/www/html/phpmyadmin
Since the root user is not supported to manage mysql by default, you need to configure an external user:
mysql -uroot -p Enter password:输入密码 回车 create user 'xhy'@'localhost' identified by '123456';
Open all permissions of this user:
grant all privileges on *.* to 'xhy'@'localhost' identified by '123456';
Refresh permissions:
flush privileges;
Next modify the phpMyAdmin configuration file:
vi /var/www/html/phpmyadmin/libraries/config.default.php
Modify the following content:
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin'; $cfg['Servers'][$i]['user'] = 'xhy'; $cfg['Servers'][$i]['password'] = '123456';
Save and exit!
Open the browser and enter the URL: http://localhost/phpmyadmin
Enter the user name: xhy, password: 123456
You can see the interface where you have successfully logged in:
PHP Chinese website has a large number of free phpmyadmin introductory tutorials, everyone is welcome to learn!
The above is the detailed content of How to install phpmyadmin4.8. For more information, please follow other related articles on the PHP Chinese website!