VarjuOrg

Linux / Windows – what’s the difference…

mysql

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 […]

, , , ,