Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bitnami Wordpress phpmyadmin无法连接到mysql_Mysql_Wordpress_Bitnami - Fatal编程技术网

Bitnami Wordpress phpmyadmin无法连接到mysql

Bitnami Wordpress phpmyadmin无法连接到mysql,mysql,wordpress,bitnami,Mysql,Wordpress,Bitnami,我正在本地使用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

我正在本地使用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

仅回答如果您无法登录Bitnami Wordpress堆栈的wp_管理区域,如何解决一般问题。另外,如果由于忘记了mysql的密码而使场景变得复杂

  • 首先使用此链接重置根密码

  • 更新phpmyadmin的配置文件config.inc.php中的密码

  •   /**
     * 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'] = '';
    
  • 然后登录phpmyadmin并按照以下步骤更改wp_admin的用户密码


  • 您是否具有mysql的命令行访问权限,是否可以重新启动mysql?不起作用…通过manager应用程序重新启动mysql…无法通过CLI登录,然后您需要重置根密码。我重置了根密码,并在phpmyadmin应用程序的confic.inc.php中更新了密码。它起作用了