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