安装PhpMyAdmin

2021/12/12 22:17:02

本文主要是介绍安装PhpMyAdmin,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1.下载安装PhpMyAdmin

@Web节点
#搜索phpMyAdmin官网,找到下载链接
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.zip
yum install unzip -y
unzip phpMyAdmin-5.1.1-all-languages.zip
mv phpMyAdmin-5.1.1-all-languages /var/www/html/phpmyadmin
cd /var/www/html/
chcon -R -t httpd_sys_content_t phpmyadmin/
yum install php-xml -y

#浏览器访问 http://ip/phpmyadmin

2.如果是远程数据库,创建具有远程管理权限的用户

@DB节点
[root@db01 ~]# mysql -uroot -pcentos
MariaDB [(none)]> grant all on *.* to 'app'@'192.168.99.%' identified by 'redhat';
MariaDB [(none)]> flush privileges;

3.解决错误提示

#1)解决cookie密码缺失问题,32位以上
[root@web03 ~]# vim /var/www/html/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = 'sziitiqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

#2)解决tmp目录不可写问题
mkdir /var/www/html/phpmyadmin/tmp
chmod 777 /var/www/html/phpmyadmin/tmp
chcon -R -t httpd_sys_content_rw_t /var/www/html/phpmyadmin/tmp



这篇关于安装PhpMyAdmin的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程