miércoles, 9 de marzo de 2016

Unable to access MySQL after it automatically generated a temporary password

Si olvidaste el password de tu mysql en tu Mac OS X.

Have you forgotten your Mac OS X 'ROOT' password and need to reset it? Follow these 4 simple steps:

1. Stop the mysqld server. Typically this can be done by from 'System Prefrences' > MySQL > 'Stop MySQL Server'

2. Start the server in safe mode with privilege bypass

From a terminal:

sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables

3. In a new terminal window:

sudo /usr/local/mysql/bin/mysql -u root

UPDATE user SET password_expired = 'N' WHERE User = 'root';

UPDATE user SET authentication_string = PASSWORD('YourNewPassword'), password_expired = 'N';


FLUSH PRIVILEGES;

\q

4. Stop the mysqld server again and restart it in normal mode.

No hay comentarios:

Publicar un comentario