Bitnami Wordpress phpmyadmin не может подключиться к mysql - PullRequest
0 голосов
/ 31 января 2020

Я использую стек WordPress по bitnami в моем локальном.

Я установил его год назад.

Теперь, когда я пытаюсь войти в wp_admin, я не помню имя пользователя /password.

Я также не могу подключиться к 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.

Ниже my config.in c. 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'] = '';

И ниже мой my.cnf mysql

[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 верна, но все еще не могу подключиться. Может быть, я упускаю что-то простое.

С наилучшими пожеланиями,

Саурав

1 Ответ

0 голосов
/ 01 февраля 2020

Просто чтобы ответить, как решить проблему generi c, если вы не можете войти в область wp_admin стека WordPress Bitnami. Также, если сценарий усложняется, если забыть пароль mysql.

  1. Сначала сбросьте пароль root, используя эту ссылку

    https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

  2. Обновите пароль в config.in c. php, файле конфигурации phpmyadmin

  3. Затем войдите в phpmyadmin и следуйте инструкциям по изменению пароля пользователя wp_admin.

    https://www.fixrunner.com/cannot-login-wordpress-admin-area/

...