手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin

 

首先要去下载最新版本: phpMyAdmin download page

1. Backup phpMyAdmin 备份当前phpmyadmin

# 备份
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

# 创建新的文件夹
sudo mkdir /usr/share/phpmyadmin/

# 进入这个文件夹
cd /usr/share/phpmyadmin/

 

2. Download and Extract phpMyAdmin 下载并解压

下载需要的版本: phpMyAdmin download page

# 我们用4.8.3版本测试
sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.8.3/phpMyAdmin-4.8.3-all-languages.tar.gz

# 解压
sudo tar xzf phpMyAdmin-4.8.3-all-languages.tar.gz

# 列出当前文件夹
ls

# 如果可以找到加压后的文件夹,那么把它移动到上面以创建的文件夹中:
sudo mv phpMyAdmin-4.8.3-all-languages/* /usr/share/phpmyadmin

打开phpmyadmin,会发现有两个报错点:

手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin
手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin

3. Edit vendor_config.php 编辑 vendor_config.php

如果你发现一个报错: The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

那么编辑文件:

# 编辑文件
sudo vi /usr/share/phpmyadmin/libraries/vendor_config.php

# 搜索 TEMP_DIR,修改或者下面一行
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');

如果你看到The configuration file now needs a secret passphrase (blowfish_secret). 

The blowfish secret is used by phpMyAdmin for cookie authentication.

# 编辑文件
sudo vi /usr/share/phpmyadmin/libraries/vendor_config.php

# 搜索 CONFIG_DIR,修改或者下面一行
define('CONFIG_DIR', '/etc/phpmyadmin/');

最后保存即可!

 

4. Cleanup 清理

sudo rm /usr/share/phpmyadmin/phpMyAdmin-4.8.3-all-languages.tar.gz
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-4.8.3-all-languages
sudo rm -rf /usr/share/phpmyadmin.bak

 

更多参考:

phpMyAdmin报错:Problem with phpMyAdmin and PHP 7.2: “Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”

phpmyadmin: 通过htaccess和htpasswd设置弹出登录窗口, PhpMyAdmin两步验证, Add an Extra Layer of Security, PhpMyAdmin Login Interface

Linux: url打开phpmyadmin, how to access phpmyadmin in lamp

phpmyadmin导入或导出超大数据库文件的解决方法

设置/修改 phpmyadmin 密码 (MAMP)

 

本文:手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.