// the root user's access privileges have been lost // → start mysql in safe mode with the option to skip (ignore) the grant tables $ mysqld_safe --skip-grant-tables &
// access as the root user $ mysql -u root
// empty the current privilege table mysql> TRUNCATE TABLE mysql.user; Query OK, 0 rows affected (0.00 sec)
// grant the root user full access privileges to all DBs on localhost mysql> GRANT ALL PRIVILEGES on *.* to root@localhost IDENTIFIED BY '(root's password)' WITH GRANT OPTION; Query OK, 0 rows affected (0.01 sec)