首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >CentOS 下安装 phpMyAdmin 4.4

CentOS 下安装 phpMyAdmin 4.4

作者头像
acc8226
发布2022-05-17 16:51:49
发布2022-05-17 16:51:49
8380
举报
文章被收录于专栏:叽叽西叽叽西

首先去官网下载 phpMyAdmin

phpMyAdmin - Files https://www.phpmyadmin.net/files/

因为 phpMyAdmin 的界面是完全基于您的浏览器,所以您需要一个网站服务器(如 Apache, nginx, IIS)来安装 phpMyAdmin。

Which PHP versions does phpMyAdmin support?

Since release 4.5, phpMyAdmin supports only PHP 5.5 and newer. Since release 4.1 phpMyAdmin supports only PHP 5.3 and newer. For PHP 5.2 you can use 4.0.x releases.

PHP 7 is supported since phpMyAdmin 4.6, PHP 7.1 is supported since 4.6.5, PHP 7.2 is supported since 4.7.4.

HHVM is supported up to phpMyAdmin 4.8.

Since release 5.0, phpMyAdmin supports only PHP 7.1 and newer.

这里由于我装的是 PHP Version 5.4.16,所以准备安装 4.4 的版本。 然后访问 http://YOUE-IP/phpMyAdmin 试试。 这是报错找不到文件夹,解决办法就是创建该文件夹 /var/lib/php/session

然后刷新页面,继续报错

代码语言:javascript
复制
Warning in ./libraries/session.inc.php#105
 session_start(): open(/var/lib/php/session/sess_htpikat322t7fgvok2nh4sb4tkcrla55, O_RDWR) failed: Permission denied (13)

这里赋予 “其他” 写的权限即可。

然后访问 http://YOUR-IP/phpMyAdmin/setup。配置一下后下载生成最终的 config.inc.php 文件

代码语言:javascript
复制
<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 4.4.15.10 setup script
 * Date: Sun, 13 Sep 2020 12:00:57 +0000
 */

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

/* End of servers configuration */

$cfg['blowfish_secret'] = '<sE>9W,96Ml)&3j@ahb-V|=y!uqwC,Qy';
$cfg['DefaultLang'] = 'zh_CN';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

这里注意我将 host 改为了 127.0.0.1, 因为不知为何我设置为localhost一直连接不上服务器。 connect_type tcp 然后认证方式 cookie user 我这里设置为数据库管理员的密码 root

blowfish_secret 为自动生成32位长度,我直接拿来用就行。

设置完毕后保存,现在可以上传到 nginx 上指定目录。

浏览http://网站域名/phpmyadmin/测试一下。(输入数据库的用户名及密码就可以了)

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-05-17,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Which PHP versions does phpMyAdmin support?
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档