Restoring MySQL root user privileges when corrupt (in linux)
1. On commandline (shut down mysql and start mysqld_safe without grant tables):
sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables &
2. On new terminal window (log on and execute code as shown):
mysql UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root'; FLUSH PRIVILEGES; GRANT ALL ON *.* TO 'root'@'localhost'; FLUSH PRIVILEGES;
3. Kill mysqld_safe instance
4. Log on as normal.
Kuidas kasutada Windows OS’is DIG’i Letsencrypt on Ubuntu 16.04 LAMP howto commandline