Не удается войти в MySQL из WAMP, но вход в MariaDB работает - PullRequest
0 голосов
/ 13 февраля 2019

Я установил WAMP и пытаюсь войти в phpmyadmin.Я не могу войти в MySQL, но я могу войти в MariaDB.Я сделал много изменений в конфигурации, но я не могу войти в систему.

$mariaFirst = ($wampConf['SupportMySQL'] == 'on' && $wampConf['SupportMariaDB'] == 'on' && $wampConf['mariaPortUsed'] == $wampConf['mysqlDefaultPort']) ? true : false;
if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
    $i++;
    if($mariaFirst) $i++;
    $cfg['Servers'][$i]['verbose'] = 'MySQL';
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['port'] = $wampConf['mysqlPortUsed'];
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'root';

    // Hidden databases in PhpMyAdmin left panel
    //$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';

    // Allow connection without password
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
}
/* Server: localhost [2] */
if($wampConf['SupportMariaDB'] =='on') {
    $i++;
    if($mariaFirst) $i -= 2;
    $cfg['Servers'][$i]['verbose'] = 'MariaDB';
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['port'] = $wampConf['mariaPortUsed'];
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'root';

    // Hidden databases in PhpMyAdmin left panel
    //$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';
    // Allow connection without password
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
}

// Suppress Warning about pmadb tables
$cfg['PmaNoRelation_DisableWarning'] = true;

// To have PRIMARY & INDEX in table structure export
$cfg['Export']['sql_drop_table'] = true;
$cfg['Export']['sql_if_not_exists'] = true;

Я изменил много параметров и все еще не могу войти в MySQL, но я могу войти в MariaDB

1 Ответ

0 голосов
/ 25 февраля 2019

Ребята, я нашел решение.MySQL Workbench работал с такими же настройками соединения.Поэтому я удалил это соединение и смог использовать MySQL в WAMP

...