Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.34 KB

VARIOS.md

File metadata and controls

33 lines (23 loc) · 1.34 KB

VARIOS

Referencias:

Acerca de la base de datos

A partir de MariaDB 10.4 la gestión de usuarios y contraseñas se realiza a través de mysql.global_priv (y no con mysql.user).

Para poner contraseña a usuario root, hacemos:

sudo su
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
systemctl restart mariadb
mariadb -u root

MariaDB [(none)]> select * from mysql.global_priv;
MariaDB [(none)]> select password('root');
MariaDB [(none)]> insert into mysql.global_priv values ('localhost', 'root', '{"access":0,"plugin":"mysql_native_password","authentication_string":"*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B","account_locked":false,"password_last_changed":0}');
MariaDB [(none)]> insert into mysql.global_priv values ('%', 'root', '{"access":0,"plugin":"mysql_native_password","authentication_string":"*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B","account_locked":false,"password_last_changed":0}');
MariaDB [(none)]> exit

systemctl unset-environment MYSQLD_OPTS
systemctl restart mariadb
mariadb -u root -proot