ERROR 1698 (28000): Access denied for user 'root'@'localhost'ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04MySQL Access denied for user 'root'@'localhost'problem during GSN installationMySQL - access denied for user root@localhostMariadb not working just after install on Ubuntu 16.04access phpmyadmin on localhost & reconfigure phpmyadmin: ERROR 1045 (28000): Access denied for user 'root'@'localhost'ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) no working solutioni have mysql 8.0.2 installed on my ubuntu 16.04.can not open it through terminal. so what to do now?ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04With Adminer.php I get a Access denied for user 'root'@'localhost' error. Ubuntu 18.04PhpMyAdmin, Access denied for user 'root'@'localhost'

Why is this clock signal connected to a capacitor to gnd?

How to prevent "they're falling in love" trope

Avoiding the "not like other girls" trope?

How to tell a function to use the default argument values?

How seriously should I take size and weight limits of hand luggage?

What do you call someone who asks many questions?

Can I run a new neutral wire to repair a broken circuit?

Apex Framework / library for consuming REST services

How do I handle a potential work/personal life conflict as the manager of one of my friends?

Unlock My Phone! February 2018

Why didn't Boeing produce its own regional jet?

Why would the Red Woman birth a shadow if she worshipped the Lord of the Light?

Venezuelan girlfriend wants to travel the USA to be with me. What is the process?

What is the idiomatic way to say "clothing fits"?

Alternative to sending password over mail?

What killed these X2 caps?

Why can't we play rap on piano?

What about the virus in 12 Monkeys?

What is the most common color to indicate the input-field is disabled?

How do conventional missiles fly?

What's the in-universe reasoning behind sorcerers needing material components?

What does the expression "A Mann!" means

How do I gain back my faith in my PhD degree?

Ambiguity in the definition of entropy



ERROR 1698 (28000): Access denied for user 'root'@'localhost'


ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04MySQL Access denied for user 'root'@'localhost'problem during GSN installationMySQL - access denied for user root@localhostMariadb not working just after install on Ubuntu 16.04access phpmyadmin on localhost & reconfigure phpmyadmin: ERROR 1045 (28000): Access denied for user 'root'@'localhost'ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) no working solutioni have mysql 8.0.2 installed on my ubuntu 16.04.can not open it through terminal. so what to do now?ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04With Adminer.php I get a Access denied for user 'root'@'localhost' error. Ubuntu 18.04PhpMyAdmin, Access denied for user 'root'@'localhost'













0















alhelal@VimLaTeX:~$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
alhelal@VimLaTeX:~$ sudo mysql -u root -p
[sudo] password for alhelal:
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 35
Server version: 10.1.29-MariaDB-6 Ubuntu 18.04

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]>


Why mariadb doesn't allow normal ubuntu user to enter mysql as mysql root user?



I also tried ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04 but failed?



ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'' at line 1









share|improve this question


























    0















    alhelal@VimLaTeX:~$ mysql -u root -p
    Enter password:
    ERROR 1698 (28000): Access denied for user 'root'@'localhost'
    alhelal@VimLaTeX:~$ sudo mysql -u root -p
    [sudo] password for alhelal:
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or g.
    Your MariaDB connection id is 35
    Server version: 10.1.29-MariaDB-6 Ubuntu 18.04

    Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

    MariaDB [(none)]>


    Why mariadb doesn't allow normal ubuntu user to enter mysql as mysql root user?



    I also tried ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04 but failed?



    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'' at line 1









    share|improve this question
























      0












      0








      0








      alhelal@VimLaTeX:~$ mysql -u root -p
      Enter password:
      ERROR 1698 (28000): Access denied for user 'root'@'localhost'
      alhelal@VimLaTeX:~$ sudo mysql -u root -p
      [sudo] password for alhelal:
      Enter password:
      Welcome to the MariaDB monitor. Commands end with ; or g.
      Your MariaDB connection id is 35
      Server version: 10.1.29-MariaDB-6 Ubuntu 18.04

      Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

      Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

      MariaDB [(none)]>


      Why mariadb doesn't allow normal ubuntu user to enter mysql as mysql root user?



      I also tried ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04 but failed?



      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'' at line 1









      share|improve this question














      alhelal@VimLaTeX:~$ mysql -u root -p
      Enter password:
      ERROR 1698 (28000): Access denied for user 'root'@'localhost'
      alhelal@VimLaTeX:~$ sudo mysql -u root -p
      [sudo] password for alhelal:
      Enter password:
      Welcome to the MariaDB monitor. Commands end with ; or g.
      Your MariaDB connection id is 35
      Server version: 10.1.29-MariaDB-6 Ubuntu 18.04

      Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

      Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

      MariaDB [(none)]>


      Why mariadb doesn't allow normal ubuntu user to enter mysql as mysql root user?



      I also tried ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04 but failed?



      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'' at line 1






      permissions mysql 18.04 mariadb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 5 '18 at 3:42









      alhelalalhelal

      74821233




      74821233




















          1 Answer
          1






          active

          oldest

          votes


















          0














          According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.



          $ sudo mysql -u root

          MariaDB [mysql]> USE mysql;
          MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

          +------------------+-----------------------+
          | User | plugin |
          +------------------+-----------------------+
          | root | auth_socket |
          +------------------+-----------------------+


          Changing this to mysql_native_password will allow you to connect without requiring sudo:



          $ sudo mysql -u root

          MariaDB [mysql]> USE mysql;
          MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
          MariaDB [mysql]> FLUSH PRIVILEGES;
          MariaDB [mysql]> exit;

          $ service mysql restart





          share|improve this answer








          New contributor




          erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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%2faskubuntu.com%2fquestions%2f1043690%2ferror-1698-28000-access-denied-for-user-rootlocalhost%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














            According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.



            $ sudo mysql -u root

            MariaDB [mysql]> USE mysql;
            MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

            +------------------+-----------------------+
            | User | plugin |
            +------------------+-----------------------+
            | root | auth_socket |
            +------------------+-----------------------+


            Changing this to mysql_native_password will allow you to connect without requiring sudo:



            $ sudo mysql -u root

            MariaDB [mysql]> USE mysql;
            MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
            MariaDB [mysql]> FLUSH PRIVILEGES;
            MariaDB [mysql]> exit;

            $ service mysql restart





            share|improve this answer








            New contributor




            erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              0














              According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.



              $ sudo mysql -u root

              MariaDB [mysql]> USE mysql;
              MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

              +------------------+-----------------------+
              | User | plugin |
              +------------------+-----------------------+
              | root | auth_socket |
              +------------------+-----------------------+


              Changing this to mysql_native_password will allow you to connect without requiring sudo:



              $ sudo mysql -u root

              MariaDB [mysql]> USE mysql;
              MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
              MariaDB [mysql]> FLUSH PRIVILEGES;
              MariaDB [mysql]> exit;

              $ service mysql restart





              share|improve this answer








              New contributor




              erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






















                0












                0








                0







                According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.



                $ sudo mysql -u root

                MariaDB [mysql]> USE mysql;
                MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

                +------------------+-----------------------+
                | User | plugin |
                +------------------+-----------------------+
                | root | auth_socket |
                +------------------+-----------------------+


                Changing this to mysql_native_password will allow you to connect without requiring sudo:



                $ sudo mysql -u root

                MariaDB [mysql]> USE mysql;
                MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
                MariaDB [mysql]> FLUSH PRIVILEGES;
                MariaDB [mysql]> exit;

                $ service mysql restart





                share|improve this answer








                New contributor




                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.



                $ sudo mysql -u root

                MariaDB [mysql]> USE mysql;
                MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

                +------------------+-----------------------+
                | User | plugin |
                +------------------+-----------------------+
                | root | auth_socket |
                +------------------+-----------------------+


                Changing this to mysql_native_password will allow you to connect without requiring sudo:



                $ sudo mysql -u root

                MariaDB [mysql]> USE mysql;
                MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
                MariaDB [mysql]> FLUSH PRIVILEGES;
                MariaDB [mysql]> exit;

                $ service mysql restart






                share|improve this answer








                New contributor




                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 2 hours ago









                ericherich

                1012




                1012




                New contributor




                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                erich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1043690%2ferror-1698-28000-access-denied-for-user-rootlocalhost%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







                    Popular posts from this blog

                    Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

                    fallocate: fallocate failed: Text file busy in Ubuntu 17.04? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)defragmenting and increasing performance of old lubuntu system with swap partitionIssue with increasing the root partition from the swapthis /usr/bin/dpkg returned error || ubuntu-16.04, 64bitDefault 17.04 swap file locationHow to Resize Ubuntu 17.04 Zesty Swap file size?Ubuntu freezes from online formsMy Laptop is not starting after upgrade ubuntu 16.04 (Kernel 4.8.0-38 to 04.10.0-36)hcp: ERROR: FALLOCATE FAILED!Not sure my swap is being usedWine 3.0 asking for more virtual free swap

                    Where else does the Shulchan Aruch quote an authority by name?Parashat Metzora+HagadolPesach/PassoverShulchan Aruch UTF-8Anonymous glosses in the Shulchan AruchWhy is the Shulchan Aruch definitive?Siman 32, Kitzur Shulchan Aruch: UntranslatedLitvaks/Yeshivish and Shulchan AruchBuying a Shulchan AruchEnglish version of SHULCHAN ARUCHIs there any place where Shulchan Aruch rules with the Rosh against the Rif and Rambam?Are there practices where Sepharadim do not hold by Shulchan Aruch?5th part of the shulchan aruch