utf8mb4 Encoding error with phpMyAdmin and remote MySQL database
问题描述:I am trying to use phpMyAdmin to access a remote MySQL database so I created a config.inc.php file (copying config.sample.inc.php) and added a server. Now this other server appear as an option in the login page but when connecting I receive this error: MySQL said #1115 - Unknown character set: 'utf8mb4'. Is there a workaround? Is there a configuration I can set? Any help highly appreciated.
解决方案:
Edit the following files:
<install path>/libraries/DatabaseInterface.class.php <install path>/libraries/mysql_charsets.lib.php
And change all instances of 'utf8mb4' to 'utf8'.
问题描述:安装phpMyAdmin 2.11.2.2,解决无法登录
打开浏览器,输入http://localhost/phpmyadmin/:

访问MYSQL数据库, 用户名:root, 密码为空(一般刚安装的MYSQL的密码均为空), 然后使用PHPMYADMIN连接时却出现了1045 MySQL无法登录 MySQL 服务器的错误,此时我采用的解决方案是:打开pypmyadmin安装目录下的libraries文件夹,找到并打开文件config.default.php,找到
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['blowfish_secret'] = '';
然后再在phpmyadmin目录下找到文件config.inc.php并打开,将上述3条代码copy进去,并自己手动设置用户名和密码,此外还要设置blowfish_secret的值:如下所示
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '********';
$cfg['blowfish_secret'] = 'cookie';
如此解决了上述两个问题即可登录phpmyadminServer主界面:

网上还有一个解决方法:
如果在本地机器配置,可以选择另一个文件叫
\libraries\config.default.php 在
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (valid choices: config, http, HTTP, signon or cookie)
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'root';
设置也可以的。可以不用密码就可以登录PMA管理,看清楚这里选择的是'config';

浙公网安备 33010602011771号