Mysql version - mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper.
I had forgotten my password and tried many commands online.Also the problem is that grant tables command not working in my terminal.
~$ cat /etc/issue
Ubuntu 16.04.3 LTS \n \l
~$ aptitude show mysql-server |grep Version
Version: 5.7.20-0ubuntu0.16.04.1
In file: /etc/mysql/debian.cnf are two important lines:
user = debian-sys-maint
password = <unique password>
Use that user and password to login to mysql: Once logged in as debian-sys-maint you can:
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With