Mostrando las entradas con la etiqueta resetear password. Mostrar todas las entradas
Mostrando las entradas con la etiqueta resetear password. Mostrar todas las entradas

lunes, 29 de julio de 2019

Reiniciar contraseña del ROOT para MYSQL

Error:

https://royfix.blogspot.com/2019/07/error-mysql-mysqldsafe-directory.html

Solución:

Ubuntu y Debian
sudo /etc/init.d/mysql stop
sudo service mysql stop

CentOS, Fedora y Red Hat Enterprise Linux
sudo /etc/init.d/mysqld stop

sudo mysqld_safe --skip-grant-tables &

Iniciar en otra pestaña o terminal:

mysql -uroot

use mysql;

update user set authentication_string=PASSWORD("mynewpassword") where User='root';
update user set plugin="mysql_native_password";


flush privileges;

quit

Iniciar de nuevo el servicio

sudo service mysql stop
sudo service mysql start

sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start