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

前端 未结 10 2498
别跟我提以往
别跟我提以往 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:00

    You need to do two additional things after following the link that you have mentioned in your post:

    One have to map the changed login cridentials in phpmyadmin's config.inc.php

    and second, you need to restart your web and mysql servers..

    php version is not the issue here..you need to go to phpmyadmin installation directory and find file config.inc.php and in that file put your current mysql password at line

    $cfg['Servers'][$i]['user'] = 'root'; //mysql username here
    $cfg['Servers'][$i]['password'] = 'password'; //mysql password here
    
    0 讨论(0)
  • 2021-01-02 00:03

    If you are installing first time then please try login with username and password as root

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

    another thing that worked for me after everything didn't - change "localhost" in config.inc.php to 127.0.0.1

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

    If you logged into "phpmyadmin", then logged out, you might have trouble attempting to log back in on the same browser window. The logout sends the browser to a URL that looks like this:

    http://localhost/phpmyadmin/index.php?db=&token=354a350abed02588e4b59f44217826fd&old_usr=tester
    

    But for me, on Mac OS X in Safari browser, that URL just doesn't want to work. Therefore, I have to put in the clean URL:

    http://localhost/phpmyadmin
    

    Don't know why, but as of today, Oct 20, 2015, that is what I am experiencing.

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

    a number of answers; check out this one also; make sure that no instance of mysql is running, always brought by not ending your sessions well. get the super user rights with

    sudo su

    and type your password when prompted to (remember nothing appears when you type your password, so, don't worry just type it and press enter). Next go to your terminal and stop all mysql instances:

    /etc/init.d/mysql stop

    after that, go and restart the mysql services (or restart xampp as a whole). This solved my problem. All the best.

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

    In mysql 5.7 the auth mechanism changed, documentation can be found in the official manual here.

    Using the system root user (or sudo) you can connect to the mysql database with the mysql 'root' user via CLI. All other users will work, too.

    In phpmyadmin however, all mysql users will work, but not the mysql 'root' user.

    This comes from here:

    $ mysql -Ne "select Host,User,plugin from mysql.user where user='root';"
    +-----------+------+-----------------------+
    | localhost | root | auth_socket |
    |  hostname | root | mysql_native_password |
    +-----------+------+-----------------------+
    

    To 'fix' this security feature, do:

    mysql -Ne "update mysql.user set plugin='mysql_native_password' where User='root' and Host='localhost'; flush privileges;"
    

    More on this can also be found here in the manual.

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