首页 > 解决方案 > phpmyadmin:无法登录 MySQL 服务器

问题描述

很抱歉提出一个常见问题,但我已经浏览了所有现有的答案,但无济于事。CENTOS 7 Mysql 8 phpmyadmin 4.4.15.10 PHP 5.4.16 上的全新设置

默认配置设置

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysqli';    // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?

mysql启动日志

2020-08-08T22:17:47.303766Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 12712
2020-08-08T22:17:47.315318Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-08-08T22:17:48.285337Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-08-08T22:17:48.507535Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-08-08T22:17:48.840424Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-08-08T22:17:48.841150Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

我从命令行创建了一个新的 mysqluser 并在 CLI 上验证了登录。无论我做什么,我都会在浏览器上看到“无法登录 MySQL 服务器”。

我尝试将端口更改为 33060 并将主机更改为 127.0.0.1 我很茫然,怀疑我错过了一些简单的东西。有什么建议么?提前致谢。

标签: phpmyadmin

解决方案


我对 Manjaro 也有同样的问题。安装网络工具为我修复了它。你有这个吗? https://centos.pkgs.org/7/centos-x86_64/net-tools-2.0-0.25.20131004git.el7.x86_64.rpm.html


推荐阅读