CentOS7(3)---安装mysql数据库管理平台 phpmyadmin

mac2022-06-30  99

https://www.cnblogs.com/tdalcn/p/6937697.html

首先服务器要有web 环境

yum install phpmyadmin

有时候会安装不成功,提示没有可用软件包,则需要安装Remi源 

# yum install epel-release # rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

 

 修改/etc/httpd/conf.d/phpMyadmin.conf

将  #Require ip 127.0.0.1   #Require ip ::1   注释 添加Require all granted   即可在浏览器通过ip/phpmyadmin 访问 我的服务器为centos7.2    文档截图     修改/etc/phpMyAdmin/config.inc.php:  $cfg['PmaAbsoluteUri']='http://localhost/phpmyadmin'; //将该参数的值设定为phpMyAdmin所处的位置。 $cfg['Servers'][$i]['host'] = 'localhost'; //设定MySQL所在的主机名或IP地址。如127.0.0.1这步很重要 $cfg['Servers'][$i]['auth_type'] = 'cookie'; // 设定进入phpMyAdmin管理MySQL的方式,共有三个选项:config、http、cookie。config是按配置文件登录,为默认方式, 无需任何确认;http是使用HTTP登录管理,在Apache模块安装下才能支持;cookie是最通用的管理方式。后两种方式的用户名和密码都是直接到数据库中验证。 $cfg['Servers'][$i]['user'] = 'root' ; //设定管理MySQL的账号。 $cfg['Servers'][$i]['password'] = '' ; //设定管理MySQL的密码。 要是你想用空密码 把配置中的$cfg['Servers'][$i]['AllowNoPassword'] = false; 改成 $cfg['Servers'][$i]['AllowNoPassword'] = true;

设 置完成后,保存config.inc.php文件,重启Apache,测试:访问http://ip地址/phpMyAdmin/或者http://ip地址:8080/phpMyAdmin/

登录账号密码与mysql数据库账号密码一致。。。

 

 

各linux版本重启apache命令 Slackware Linux命令:   /etc/rc.d/rc.httpd restart ubuntu、Debian 系统命令:   /etc/init.d/apache2 restart Fedora 、Redhat、CentOS系统重启Apache命令:   /etc/init.d/httpd restart 或 service httpd restart(CentOS 成功)

 

本文摘自互联网。

 

转载于:https://www.cnblogs.com/huanglinxin/p/8710578.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)