Error # 1045 - Cannot Log in to MySQL server -> phpmyadmin

前端 未结 10 2499
别跟我提以往
别跟我提以往 2021-01-01 23:28

We have installed PHPMyAdmin on a windows machine running IIS 7.0.
We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin.

相关标签:
10条回答
  • 2021-01-02 00:15
    sudo service mysql stop
    

    sudo mysqld --skip-grant-tables &
    

    mysql -u root mysql
    

    Change MYSECRET with your new root password
    
    UPDATE user SET Password=PASSWORD('MYSECRET') WHERE User='root'; FLUSH PRIVILEGES; exit;
    
    0 讨论(0)
  • 2021-01-02 00:18

    In Linux I resolve this problem by going to the root command prompt type:

    # mysqladmin -u root password 'Secret Phrase Here'
    

    Then go back and login. Works every time!

    0 讨论(0)
  • 2021-01-02 00:19

    For ubuntu users, your config.inc.php file should be like this

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'username';
    $cfg['Servers'][$i]['password'] = 'password';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    /**
     * phpMyAdmin configuration storage settings.
     */
    /* User used to manipulate with storage */
    // $cfg['Servers'][$i]['controlhost'] = '';
    // $cfg['Servers'][$i]['controlport'] = '';
    // $cfg['Servers'][$i]['controluser'] = 'pma';
    // $cfg['Servers'][$i]['controlpass'] = '';
    
    0 讨论(0)
  • 2021-01-02 00:20

    When you change your passwords in the security tab, there are two sections, one above and one below. I think the common mistake here is that others try to log-in with the account they have set "below" the one used for htaccess, whereas they should log in to the password they set on the above section. That's how I fixed mine.

    0 讨论(0)
提交回复
热议问题