我在本地使用bitnami的wordpress堆栈。
我一年前就安装了它。
现在,当我尝试登录wp_admin时,我忘记了用户名/密码。
我也无法连接到phpmyadmin来查看用户名/密码设置。
我收到以下错误
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
下面是我的config.inc.php的phpmyadmin用户名/密码设置的相关部分
/**
* Authentication method (valid choices: config, http, signon or cookie)
*
* @global string $cfg['Servers'][$i]['auth_type']
*/
$cfg['Servers'][$i]['auth_type'] = 'config';
/**
* HTTP Basic Auth Realm name to display (only used with 'HTTP' auth_type)
*
* @global string $cfg['Servers'][$i]['auth_http_realm']
*/
$cfg['Servers'][$i]['auth_http_realm'] = '';
/**
* MySQL user
*
* @global string $cfg['Servers'][$i]['user']
*/
$cfg['Servers'][$i]['user'] = 'root';
/**
* MySQL password (only needed with 'config' auth_type)
*
* @global string $cfg['Servers'][$i]['password']
*/
$cfg['Servers'][$i]['password'] = '';
/**
* whether to allow root login
*
* @global boolean $cfg['Servers'][$i]['AllowRoot']
*/
$cfg['Servers'][$i]['AllowRoot'] = true;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
下面是我的mysql my.cnf
[mysqladmin]
user=root
[mysqld]
basedir=/Applications/wordpress-4.9.4-4/mysql
datadir="/Applications/wordpress-4.9.4-4/mysql/data"
port=3306
socket=/Applications/wordpress-4.9.4-4/mysql/tmp/mysql.sock
tmpdir=/Applications/wordpress-4.9.4-4/mysql/tmp
max_allowed_packet=32M
bind-address=127.0.0.1
skip-name-resolve=1
character-set-server=UTF8
collation-server=utf8_general_ci
[client]
port=3306
socket=/Applications/wordpress-4.9.4-4/mysql/tmp/mysql.sock
default-character-set=UTF8
[manager]
port=3306
socket=/Applications/wordpress-4.9.4-4/mysql/tmp/mysql.sock
pid-file=/Applications/wordpress-4.9.4-4/mysql/tmp/manager.pid
default-mysqld-path=/Applications/wordpress-4.9.4-4/mysql/bin/mysqld.bin
我可以在我的phpmyadmin中看到连接到mysql的配置是正确的,但仍然无法连接。也许我遗漏了一些简单的东西。
诚挚的问候,
Saurav
发布于 2020-02-01 23:48:48
如果你不能登录Bitnami Wordpress堆栈的wp_admin区域,那么如何解决这个通用问题呢?此外,如果场景因忘记mysql的密码而变得复杂。
在phpmyadmin
https://www.fixrunner.com/cannot-login-wordpress-admin-area/
https://stackoverflow.com/questions/60009881
复制相似问题