Mostrando las entradas con la etiqueta mysql. Mostrar todas las entradas
Mostrando las entradas con la etiqueta mysql. 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

Error MYSQL -> mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists

Error:

2017-02-10T17:05:44.870970Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2017-02-10T17:05:44.872874Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2017-02-10T17:05:44.874547Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.

Solución:

mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld

https://royfix.blogspot.com/2019/07/reset-mysql-root-password.html