Mariadb non-root userERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)MySQL Access denied for user 'root'@'localhost'Mariadb not working just after install on Ubuntu 16.04i 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.04ERROR 1698 (28000): Access denied for user 'root'@'localhost'Problem in accessing to Mysql

Who verifies the trust of certificate authorities?

How to tell my Mom that I don't care about someone without upsetting her?

Intersection of sorted lists

Prospective employer asking for my current pay slip during interview

Thoughts on using user stories to define business/platform needs?

50K what to do with it?

How do electric hot water heaters explode and what can be done to prevent that from happening?

Forecast accuracy rolling window

Exception in thread "main" java.lang.AssertionError: expected [3] but found [3]

What's the difference between jpg and JPG on mac?

Ball hits curve of same curvature

Is gaining 1 AC in exchange for disadvantage on Perception checks a balanced trade?

Round up my number

Turing award papers

Professor Pun's Personal Project

How to replace all elements of a list by a rule "element" -> "element_"

Is a midspace space station between Earth and Mars practical?

Retracting Recommendation Letters

Which moves can’t be used in raid battles?

Delete selection without gradient effect

How much tech advancement could be made out of modern processor appearing in 1980s?

Prefix all commands in shell

Can I make leading exclamation points be ignored in the terminal? (I type them by instinct due to ipython)

What should be done if I suspect a player is using weighted dice?



Mariadb non-root user


ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)MySQL Access denied for user 'root'@'localhost'Mariadb not working just after install on Ubuntu 16.04i 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.04ERROR 1698 (28000): Access denied for user 'root'@'localhost'Problem in accessing to Mysql






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















I have installed mariadb and when as a Linux root user, I can run mysql command to access the database. But when I try to login as a normal Linux user and run mysql -u root -p, I am getting error:



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


I tried several methods like reset password for the mysql root user, but no use.



Any help will be great.










share|improve this question



























  • Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    – Faizan Akram Dar
    Dec 3 '16 at 10:37

















0


















I have installed mariadb and when as a Linux root user, I can run mysql command to access the database. But when I try to login as a normal Linux user and run mysql -u root -p, I am getting error:



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


I tried several methods like reset password for the mysql root user, but no use.



Any help will be great.










share|improve this question



























  • Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    – Faizan Akram Dar
    Dec 3 '16 at 10:37













0













0









0








I have installed mariadb and when as a Linux root user, I can run mysql command to access the database. But when I try to login as a normal Linux user and run mysql -u root -p, I am getting error:



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


I tried several methods like reset password for the mysql root user, but no use.



Any help will be great.










share|improve this question
















I have installed mariadb and when as a Linux root user, I can run mysql command to access the database. But when I try to login as a normal Linux user and run mysql -u root -p, I am getting error:



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


I tried several methods like reset password for the mysql root user, but no use.



Any help will be great.







mysql root mariadb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 5 '16 at 8:43









muru

1




1










asked May 5 '16 at 8:34









Narayanan NarayananNarayanan Narayanan

11 silver badge1 bronze badge




11 silver badge1 bronze badge















  • Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    – Faizan Akram Dar
    Dec 3 '16 at 10:37

















  • Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    – Faizan Akram Dar
    Dec 3 '16 at 10:37
















Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

– Faizan Akram Dar
Dec 3 '16 at 10:37





Possible duplicate of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

– Faizan Akram Dar
Dec 3 '16 at 10:37










2 Answers
2






active

oldest

votes


















0



















I had the same problem, it was caused by a "plugin" value in "mysql.user" table.



Have you tried with this answer: https://askubuntu.com/a/636579/299538



Here is an explanation for that: https://superuser.com/a/1071043/592085






share|improve this answer


































    0



















    In MariaDB you cannot login with normal user, you must root access or use sudo. Another solution add another root user with full privileges.



    Connect with sudo to db:



    sudo mysql -u root


    Check your account in present db:



    mysql> SELECT User,Host FROM mysql.user;
    +------------------+-----------+
    | User | Host |
    +------------------+-----------+
    | root | localhost |


    Recreate user root (use password if you need):



    mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';


    Give permission:



    mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


    Flush:



    mysql> FLUSH PRIVILEGES;


    Show database uses:



    SELECT User,Host FROM mysql.user;
    +------+-----------+
    | User | Host |
    +------+-----------+
    | root | % |
    | root | localhost |
    +------+-----------+


    Exit and connect with normal user:



    mysql -u root





    share|improve this answer


























      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/4.0/"u003ecc by-sa 4.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%2f767887%2fmariadb-non-root-user%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown


























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0



















      I had the same problem, it was caused by a "plugin" value in "mysql.user" table.



      Have you tried with this answer: https://askubuntu.com/a/636579/299538



      Here is an explanation for that: https://superuser.com/a/1071043/592085






      share|improve this answer































        0



















        I had the same problem, it was caused by a "plugin" value in "mysql.user" table.



        Have you tried with this answer: https://askubuntu.com/a/636579/299538



        Here is an explanation for that: https://superuser.com/a/1071043/592085






        share|improve this answer





























          0















          0











          0









          I had the same problem, it was caused by a "plugin" value in "mysql.user" table.



          Have you tried with this answer: https://askubuntu.com/a/636579/299538



          Here is an explanation for that: https://superuser.com/a/1071043/592085






          share|improve this answer
















          I had the same problem, it was caused by a "plugin" value in "mysql.user" table.



          Have you tried with this answer: https://askubuntu.com/a/636579/299538



          Here is an explanation for that: https://superuser.com/a/1071043/592085







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Apr 13 '17 at 12:23









          Community

          1




          1










          answered May 9 '16 at 17:55









          J.SerraJ.Serra

          5311 gold badge6 silver badges24 bronze badges




          5311 gold badge6 silver badges24 bronze badges


























              0



















              In MariaDB you cannot login with normal user, you must root access or use sudo. Another solution add another root user with full privileges.



              Connect with sudo to db:



              sudo mysql -u root


              Check your account in present db:



              mysql> SELECT User,Host FROM mysql.user;
              +------------------+-----------+
              | User | Host |
              +------------------+-----------+
              | root | localhost |


              Recreate user root (use password if you need):



              mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';


              Give permission:



              mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


              Flush:



              mysql> FLUSH PRIVILEGES;


              Show database uses:



              SELECT User,Host FROM mysql.user;
              +------+-----------+
              | User | Host |
              +------+-----------+
              | root | % |
              | root | localhost |
              +------+-----------+


              Exit and connect with normal user:



              mysql -u root





              share|improve this answer





























                0



















                In MariaDB you cannot login with normal user, you must root access or use sudo. Another solution add another root user with full privileges.



                Connect with sudo to db:



                sudo mysql -u root


                Check your account in present db:



                mysql> SELECT User,Host FROM mysql.user;
                +------------------+-----------+
                | User | Host |
                +------------------+-----------+
                | root | localhost |


                Recreate user root (use password if you need):



                mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';


                Give permission:



                mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


                Flush:



                mysql> FLUSH PRIVILEGES;


                Show database uses:



                SELECT User,Host FROM mysql.user;
                +------+-----------+
                | User | Host |
                +------+-----------+
                | root | % |
                | root | localhost |
                +------+-----------+


                Exit and connect with normal user:



                mysql -u root





                share|improve this answer



























                  0















                  0











                  0









                  In MariaDB you cannot login with normal user, you must root access or use sudo. Another solution add another root user with full privileges.



                  Connect with sudo to db:



                  sudo mysql -u root


                  Check your account in present db:



                  mysql> SELECT User,Host FROM mysql.user;
                  +------------------+-----------+
                  | User | Host |
                  +------------------+-----------+
                  | root | localhost |


                  Recreate user root (use password if you need):



                  mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';


                  Give permission:



                  mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


                  Flush:



                  mysql> FLUSH PRIVILEGES;


                  Show database uses:



                  SELECT User,Host FROM mysql.user;
                  +------+-----------+
                  | User | Host |
                  +------+-----------+
                  | root | % |
                  | root | localhost |
                  +------+-----------+


                  Exit and connect with normal user:



                  mysql -u root





                  share|improve this answer














                  In MariaDB you cannot login with normal user, you must root access or use sudo. Another solution add another root user with full privileges.



                  Connect with sudo to db:



                  sudo mysql -u root


                  Check your account in present db:



                  mysql> SELECT User,Host FROM mysql.user;
                  +------------------+-----------+
                  | User | Host |
                  +------------------+-----------+
                  | root | localhost |


                  Recreate user root (use password if you need):



                  mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';


                  Give permission:



                  mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';


                  Flush:



                  mysql> FLUSH PRIVILEGES;


                  Show database uses:



                  SELECT User,Host FROM mysql.user;
                  +------+-----------+
                  | User | Host |
                  +------+-----------+
                  | root | % |
                  | root | localhost |
                  +------+-----------+


                  Exit and connect with normal user:



                  mysql -u root






                  share|improve this answer













                  share|improve this answer




                  share|improve this answer










                  answered Sep 28 at 6:42









                  ObelixObelix

                  236 bronze badges




                  236 bronze badges































                      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%2f767887%2fmariadb-non-root-user%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

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?