The objective is to reset lost root MySQL password on Ubuntu 18.04 Bionic Beaver Linux.
The simplest approach to reset MySQL database root password is to execute mysql_secure_installation program and when prompted entering your new root MySQL password:
James Gonzales
You have no idea how much I appreciate this article!! I have had hell trying to reset the root password until I stumbled upon this. I am thankful for people like you and your willingness and ability to share things like this. THANK YOU VERY MUCH!!!
Thank you!! I happy its the first article that actually includes all the proper steps for Ubuntu 18, usually its a lots of researching to get through the full procedure!
I’m getting syntax error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(“linuxc”) WHERE User=‘root’’ at line 1
What is the exact SQL command you execute? From the error message you posted, I would guess you did not close the value of the key “user” with the left single-quote.