phpMyAdmin Cannot log in to the MySQL server on Centos 7

Multi tool use
Multi tool use





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I installed mysql-community-server-8.0.13-1.el7.x86_64 on Centos 7 with Nginx, and added the phpMyAdmin to manage the databases but I keep getting error Cannot log in to the MySQL server from phpMyAdmin. I've tried the following and have been struggling for a few days now:





  • Changed some of the parameters (suggested on stackoverflow) located on /etc/phpMyAdmin/config.inc.php like the following but no luck:



    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'socket';
    $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'password';


  • I've tried mysql shell, and I'm able to login with root and other users. But, I have no idea why it fails on phpMyAdmin. Please help and thanks!











share|improve this question

























  • Possible duplicate of Can not login to phpmyadmin with root user

    – René Höhle
    Jan 3 at 22:36











  • @Stony thanks for the help but it didn't worked.

    – Jacman
    Jan 3 at 23:18











  • Does /var/run/mysqld/mysqlx.sock exist?

    – Light.G
    Jan 4 at 2:14











  • @Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

    – Jacman
    Jan 4 at 15:52











  • When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

    – Isaac Bennetch
    Jan 5 at 21:53


















0















I installed mysql-community-server-8.0.13-1.el7.x86_64 on Centos 7 with Nginx, and added the phpMyAdmin to manage the databases but I keep getting error Cannot log in to the MySQL server from phpMyAdmin. I've tried the following and have been struggling for a few days now:





  • Changed some of the parameters (suggested on stackoverflow) located on /etc/phpMyAdmin/config.inc.php like the following but no luck:



    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'socket';
    $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'password';


  • I've tried mysql shell, and I'm able to login with root and other users. But, I have no idea why it fails on phpMyAdmin. Please help and thanks!











share|improve this question

























  • Possible duplicate of Can not login to phpmyadmin with root user

    – René Höhle
    Jan 3 at 22:36











  • @Stony thanks for the help but it didn't worked.

    – Jacman
    Jan 3 at 23:18











  • Does /var/run/mysqld/mysqlx.sock exist?

    – Light.G
    Jan 4 at 2:14











  • @Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

    – Jacman
    Jan 4 at 15:52











  • When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

    – Isaac Bennetch
    Jan 5 at 21:53














0












0








0








I installed mysql-community-server-8.0.13-1.el7.x86_64 on Centos 7 with Nginx, and added the phpMyAdmin to manage the databases but I keep getting error Cannot log in to the MySQL server from phpMyAdmin. I've tried the following and have been struggling for a few days now:





  • Changed some of the parameters (suggested on stackoverflow) located on /etc/phpMyAdmin/config.inc.php like the following but no luck:



    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'socket';
    $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'password';


  • I've tried mysql shell, and I'm able to login with root and other users. But, I have no idea why it fails on phpMyAdmin. Please help and thanks!











share|improve this question
















I installed mysql-community-server-8.0.13-1.el7.x86_64 on Centos 7 with Nginx, and added the phpMyAdmin to manage the databases but I keep getting error Cannot log in to the MySQL server from phpMyAdmin. I've tried the following and have been struggling for a few days now:





  • Changed some of the parameters (suggested on stackoverflow) located on /etc/phpMyAdmin/config.inc.php like the following but no luck:



    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'socket';
    $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'password';


  • I've tried mysql shell, and I'm able to login with root and other users. But, I have no idea why it fails on phpMyAdmin. Please help and thanks!








nginx phpmyadmin centos7 mysql-8.0






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 7 at 21:39







Jacman

















asked Jan 3 at 21:49









JacmanJacman

43421123




43421123













  • Possible duplicate of Can not login to phpmyadmin with root user

    – René Höhle
    Jan 3 at 22:36











  • @Stony thanks for the help but it didn't worked.

    – Jacman
    Jan 3 at 23:18











  • Does /var/run/mysqld/mysqlx.sock exist?

    – Light.G
    Jan 4 at 2:14











  • @Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

    – Jacman
    Jan 4 at 15:52











  • When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

    – Isaac Bennetch
    Jan 5 at 21:53



















  • Possible duplicate of Can not login to phpmyadmin with root user

    – René Höhle
    Jan 3 at 22:36











  • @Stony thanks for the help but it didn't worked.

    – Jacman
    Jan 3 at 23:18











  • Does /var/run/mysqld/mysqlx.sock exist?

    – Light.G
    Jan 4 at 2:14











  • @Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

    – Jacman
    Jan 4 at 15:52











  • When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

    – Isaac Bennetch
    Jan 5 at 21:53

















Possible duplicate of Can not login to phpmyadmin with root user

– René Höhle
Jan 3 at 22:36





Possible duplicate of Can not login to phpmyadmin with root user

– René Höhle
Jan 3 at 22:36













@Stony thanks for the help but it didn't worked.

– Jacman
Jan 3 at 23:18





@Stony thanks for the help but it didn't worked.

– Jacman
Jan 3 at 23:18













Does /var/run/mysqld/mysqlx.sock exist?

– Light.G
Jan 4 at 2:14





Does /var/run/mysqld/mysqlx.sock exist?

– Light.G
Jan 4 at 2:14













@Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

– Jacman
Jan 4 at 15:52





@Light.G Yes, it's there. I guess my option would be to uninstall and reinstall MySQL

– Jacman
Jan 4 at 15:52













When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

– Isaac Bennetch
Jan 5 at 21:53





When you log in from the command line client, please run the STATUS; command to see the connection type (whether some host "via TCP/IP" or "Localhost via UNIX socket"). Also note the path to the UNIX socket if it's provided. How have you installed phpMyAdmin - through the package manager or by downloading and uncompressing it yourself?

– Isaac Bennetch
Jan 5 at 21:53












1 Answer
1






active

oldest

votes


















0














I was able to resolve this by doing the following:
(I should mention that this solution works for MySQL 8.0.13 and phpMyAdmin 4.8.4 - Both, latest version today)



1- I edited config.inc.php with these server parameters (only):



/*** This is needed for cookie based authentication to encrypt password in 
cookie. Needs to be 32 chars long. */
$cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';

/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;


2- On MySQL terminal



//Create a new user:
mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';

//Grant all privileges:
mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;

//Flush all privileges:
mysql> FLUSH PRIVILEGES;

//Change authentication_string with password:
mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
'your_password';

//Login with the new user and password!


This should allow you to login into phpMyAdmin. I hope this help!






share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54030283%2fphpmyadmin-cannot-log-in-to-the-mysql-server-on-centos-7%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I was able to resolve this by doing the following:
    (I should mention that this solution works for MySQL 8.0.13 and phpMyAdmin 4.8.4 - Both, latest version today)



    1- I edited config.inc.php with these server parameters (only):



    /*** This is needed for cookie based authentication to encrypt password in 
    cookie. Needs to be 32 chars long. */
    $cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';

    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = false;


    2- On MySQL terminal



    //Create a new user:
    mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';

    //Grant all privileges:
    mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;

    //Flush all privileges:
    mysql> FLUSH PRIVILEGES;

    //Change authentication_string with password:
    mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
    'your_password';

    //Login with the new user and password!


    This should allow you to login into phpMyAdmin. I hope this help!






    share|improve this answer






























      0














      I was able to resolve this by doing the following:
      (I should mention that this solution works for MySQL 8.0.13 and phpMyAdmin 4.8.4 - Both, latest version today)



      1- I edited config.inc.php with these server parameters (only):



      /*** This is needed for cookie based authentication to encrypt password in 
      cookie. Needs to be 32 chars long. */
      $cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';

      /* Authentication type */
      $cfg['Servers'][$i]['auth_type'] = 'cookie';

      /* Server parameters */
      $cfg['Servers'][$i]['host'] = 'localhost';
      $cfg['Servers'][$i]['compress'] = false;
      $cfg['Servers'][$i]['AllowNoPassword'] = false;


      2- On MySQL terminal



      //Create a new user:
      mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';

      //Grant all privileges:
      mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;

      //Flush all privileges:
      mysql> FLUSH PRIVILEGES;

      //Change authentication_string with password:
      mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
      'your_password';

      //Login with the new user and password!


      This should allow you to login into phpMyAdmin. I hope this help!






      share|improve this answer




























        0












        0








        0







        I was able to resolve this by doing the following:
        (I should mention that this solution works for MySQL 8.0.13 and phpMyAdmin 4.8.4 - Both, latest version today)



        1- I edited config.inc.php with these server parameters (only):



        /*** This is needed for cookie based authentication to encrypt password in 
        cookie. Needs to be 32 chars long. */
        $cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';

        /* Authentication type */
        $cfg['Servers'][$i]['auth_type'] = 'cookie';

        /* Server parameters */
        $cfg['Servers'][$i]['host'] = 'localhost';
        $cfg['Servers'][$i]['compress'] = false;
        $cfg['Servers'][$i]['AllowNoPassword'] = false;


        2- On MySQL terminal



        //Create a new user:
        mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';

        //Grant all privileges:
        mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;

        //Flush all privileges:
        mysql> FLUSH PRIVILEGES;

        //Change authentication_string with password:
        mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
        'your_password';

        //Login with the new user and password!


        This should allow you to login into phpMyAdmin. I hope this help!






        share|improve this answer















        I was able to resolve this by doing the following:
        (I should mention that this solution works for MySQL 8.0.13 and phpMyAdmin 4.8.4 - Both, latest version today)



        1- I edited config.inc.php with these server parameters (only):



        /*** This is needed for cookie based authentication to encrypt password in 
        cookie. Needs to be 32 chars long. */
        $cfg['blowfish_secret'] = 'generate_your_blowfish_secret_32_chars';

        /* Authentication type */
        $cfg['Servers'][$i]['auth_type'] = 'cookie';

        /* Server parameters */
        $cfg['Servers'][$i]['host'] = 'localhost';
        $cfg['Servers'][$i]['compress'] = false;
        $cfg['Servers'][$i]['AllowNoPassword'] = false;


        2- On MySQL terminal



        //Create a new user:
        mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'your_password';

        //Grant all privileges:
        mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost' WITH GRANT OPTION;

        //Flush all privileges:
        mysql> FLUSH PRIVILEGES;

        //Change authentication_string with password:
        mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY
        'your_password';

        //Login with the new user and password!


        This should allow you to login into phpMyAdmin. I hope this help!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 11 at 16:28

























        answered Jan 10 at 20:00









        JacmanJacman

        43421123




        43421123
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54030283%2fphpmyadmin-cannot-log-in-to-the-mysql-server-on-centos-7%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            lrv Y3XBaHPwmxL5P5ZPw5 SE Uw11C k,L4QQve djeDzrdsqbxSXcTlhCWvApYyqsV 0qQ
            hjMQ0MOgcOzp4qg 5W P,Xx,hT04u2xuG,rGbXw6s8EdtkN2Sc1ewuOREfsd2Rr qr M 8DDWvhJo 5x

            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas