centos7.2
lamp之phpadmin
PhpMyAdmin是一个以PHP为基础,以Web-Base方式架构在网站主机上的MySQL的数据库管理工具,让管理者可用Web接口管理MySQL数据库
~]# yum install httpd php php-mysql mariadb-server 安装需要的服务
~]#systemctl start httpd 启动httpd服务
~]#systemctl start mariadb 启动mysql服务
~]# ss -tnl 查看监听的端口
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 50 :3306:LISTEN 0 128 :::80 ::::*
~]# systemctl stop firewalld 关闭防火墙
~]# systemctl disable firewalld永久关闭防火墙
~]# setenforce 0 暂时关闭selinux
~]# sed -i "s/^SELINUX\=enforcing/SELINUX\=disabled/g" /etc/selinux/config 永久关闭selinux
~]# unzip phpMyAdmin-4.7.9-all-languages.zip 解压phpmyadmin
~]# cp -a phpMyAdmin-4.7.9-all-languages /var/www/html/ 复制到指定目录
html]# ln -s phpMyAdmin-4.7.9-all-languages pma 创建软连接,方便以后升级
html]# cd pma/
pma]# cp config.sample.inc.php config.inc.php 复制配置文件
~]# tr -d 'a-z0-9A-Z'
7a1e4b41291c0c74e82ef5a5f528dc82 - 生成随机字符串
pma]#vim config.inc.php 编辑配置文件
$cfg['blowfish_secret'] = '7a1e4b41291c0c74e82ef5a5f528dc82';添加随机字符串
浏览器登陆:192.168.1.102/pma
提示:The mbstring extension is missing。
pma]# yum install php-mbstring -y 安装扩展模块
pma]# systemctl reload httpd 重新加载,重新登录
登录界面
MariaDB [(none)]> set password for 'root'@'localhost'=password('magedu');
MariaDB [(none)]> set password for 'root'@'127.0.0.1'=password('magedu');
MariaDB [(none)]> flush privileges; 重读授权表生效
在登录界面输入上面的用户名和密码即可