Cambiar contraseña de ROOT en MySQL 5
- Login as root to the box with the MySQL server.
- Stop MySQL server.
- Open the mysql server startup script. This is the file you have just executed to stop MySQL server.
- Find the line that contains the mysqld_safe command and add --skip-grant-tables as its parameter.
- Start MySQL server.
- Login as the mysql user and connect to the mysql user/permission database and run the update queries: # mysql -u root mysqlreplacing newrootpassword with the new root password to the box with the MySQL server.
mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES; - Exit mysql database by typing \q.
- Exit mysql user console by typing exit
- Stop MySQL server.
- Open the mysql server startup script and remove the --skip-grant-tables parameter you added above.
- Start MySQL server.
- Open file ~mysql/.my.cnf and update the password in the corresponding line.
0 Comments:
Publicar un comentario
<< Home