Cambiar password de root en mariaDB (Windows)
1. Realizar un shutdown al servicio de mariaDB si este se encuentra iniciado
2. Abra un CMD como admnistrador y ejecute:
mysqld -P3306
3. Abra otro CMD como administrador y ejecute:
C:\Windows\System32>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 11.4.3-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
4. Modifique el password de root segun su necesidad, así:
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('nuevoPasss');
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]>
5. Salga de la consola de mysql, así:
MariaDB [(none)]> exit
Bye
C:\Windows\System32>
5. Cierre esta ventana y diríjase a la ventana inicialmente abierta y termine el proceso con CRTL-C. Cierre esa ventana
6. Reinicie el servicio y conectese con el nuevo password
mysql -u root -p
Enter password: ********
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 11.4.3-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nodeapi |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.023 sec)
MariaDB [(none)]>