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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite
1












I have followed this tutorial to install MySQL but after successfully installed MySQL, I could not access database.




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








share|improve this question




















  • I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
    – Mohammad.H Fathi
    May 7 at 10:51














up vote
1
down vote

favorite
1












I have followed this tutorial to install MySQL but after successfully installed MySQL, I could not access database.




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








share|improve this question




















  • I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
    – Mohammad.H Fathi
    May 7 at 10:51












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have followed this tutorial to install MySQL but after successfully installed MySQL, I could not access database.




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








share|improve this question












I have followed this tutorial to install MySQL but after successfully installed MySQL, I could not access database.




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










share|improve this question











share|improve this question




share|improve this question










asked Apr 28 at 11:15









Ashrafuzzaman Sujan

891210




891210











  • I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
    – Mohammad.H Fathi
    May 7 at 10:51
















  • I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
    – Mohammad.H Fathi
    May 7 at 10:51















I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
– Mohammad.H Fathi
May 7 at 10:51




I faced the same issue, after some digging, got it that u have to set root password your self following instructions at the StackOverFlow.
– Mohammad.H Fathi
May 7 at 10:51










1 Answer
1






active

oldest

votes

















up vote
9
down vote



accepted










I found a solution at here link, by following this solution I have solved my problem.



Short steps are:



sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';


Note: here test is a new password for root user.






share|improve this answer






















  • Thank you. It is odd mysql-server not propting to enter password anymore.
    – gamofe
    May 19 at 13:45










  • its worked !!!!!
    – Fatima Zohra
    May 31 at 7:30






  • 1




    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 'b230mehonot'' at line 1
    – alhelal
    Jun 5 at 3:40










  • same error here... :(
    – user1111929
    Jun 8 at 20:57










  • @alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
    – Ashrafuzzaman Sujan
    Jun 21 at 1:43










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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f1029177%2ferror-1698-28000-access-denied-for-user-rootlocalhost-at-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
9
down vote



accepted










I found a solution at here link, by following this solution I have solved my problem.



Short steps are:



sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';


Note: here test is a new password for root user.






share|improve this answer






















  • Thank you. It is odd mysql-server not propting to enter password anymore.
    – gamofe
    May 19 at 13:45










  • its worked !!!!!
    – Fatima Zohra
    May 31 at 7:30






  • 1




    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 'b230mehonot'' at line 1
    – alhelal
    Jun 5 at 3:40










  • same error here... :(
    – user1111929
    Jun 8 at 20:57










  • @alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
    – Ashrafuzzaman Sujan
    Jun 21 at 1:43














up vote
9
down vote



accepted










I found a solution at here link, by following this solution I have solved my problem.



Short steps are:



sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';


Note: here test is a new password for root user.






share|improve this answer






















  • Thank you. It is odd mysql-server not propting to enter password anymore.
    – gamofe
    May 19 at 13:45










  • its worked !!!!!
    – Fatima Zohra
    May 31 at 7:30






  • 1




    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 'b230mehonot'' at line 1
    – alhelal
    Jun 5 at 3:40










  • same error here... :(
    – user1111929
    Jun 8 at 20:57










  • @alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
    – Ashrafuzzaman Sujan
    Jun 21 at 1:43












up vote
9
down vote



accepted







up vote
9
down vote



accepted






I found a solution at here link, by following this solution I have solved my problem.



Short steps are:



sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';


Note: here test is a new password for root user.






share|improve this answer














I found a solution at here link, by following this solution I have solved my problem.



Short steps are:



sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';


Note: here test is a new password for root user.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 5 at 4:52


























community wiki





2 revs, 2 users 82%
Ashrafuzzaman Sujan












  • Thank you. It is odd mysql-server not propting to enter password anymore.
    – gamofe
    May 19 at 13:45










  • its worked !!!!!
    – Fatima Zohra
    May 31 at 7:30






  • 1




    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 'b230mehonot'' at line 1
    – alhelal
    Jun 5 at 3:40










  • same error here... :(
    – user1111929
    Jun 8 at 20:57










  • @alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
    – Ashrafuzzaman Sujan
    Jun 21 at 1:43
















  • Thank you. It is odd mysql-server not propting to enter password anymore.
    – gamofe
    May 19 at 13:45










  • its worked !!!!!
    – Fatima Zohra
    May 31 at 7:30






  • 1




    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 'b230mehonot'' at line 1
    – alhelal
    Jun 5 at 3:40










  • same error here... :(
    – user1111929
    Jun 8 at 20:57










  • @alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
    – Ashrafuzzaman Sujan
    Jun 21 at 1:43















Thank you. It is odd mysql-server not propting to enter password anymore.
– gamofe
May 19 at 13:45




Thank you. It is odd mysql-server not propting to enter password anymore.
– gamofe
May 19 at 13:45












its worked !!!!!
– Fatima Zohra
May 31 at 7:30




its worked !!!!!
– Fatima Zohra
May 31 at 7:30




1




1




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 'b230mehonot'' at line 1
– alhelal
Jun 5 at 3:40




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 'b230mehonot'' at line 1
– alhelal
Jun 5 at 3:40












same error here... :(
– user1111929
Jun 8 at 20:57




same error here... :(
– user1111929
Jun 8 at 20:57












@alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
– Ashrafuzzaman Sujan
Jun 21 at 1:43




@alhelal, The solution is for MySQL not for MariaDB. So you can try another solution.
– Ashrafuzzaman Sujan
Jun 21 at 1:43

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029177%2ferror-1698-28000-access-denied-for-user-rootlocalhost-at-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error