I need to restart MySQL in Ubuntu 16.04 with the
--skip-grant-tables option enabled, but either I don't know my root password or it isn't working. How can I set
--skip-grant-tables without the password?
When I try it as a regular user:
I see this:
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
So, I dug this example out of /etc/init.d/mysql and added the
su - mysql -s /bin/bash -c "/usr/sbin/mysqld --skip-grant-tables" Password: su: Authentication failure
So su doesn't work and the root password didn't work either. I also tried this:
sudo su - mysql -s /bin/bash -c "/usr/sbin/mysqld --skip-grant-tables" No directory, logging in with HOME=/
How can I start mysql with --skip-grant-tables?