wiki:mariadb_reenable_password_authentication
Differences
This shows you the differences between two versions of the page.
| wiki:mariadb_reenable_password_authentication [2021/03/08 14:53] – created antisa | wiki:mariadb_reenable_password_authentication [2022/01/20 11:47] (current) – add Debian 11 instructions antisa | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== mariadb reenable password authentication ====== | ====== mariadb reenable password authentication ====== | ||
| - | ===== Disable unix socket authentication | + | ===== Debian 10 ===== |
| + | |||
| + | ==== Disable unix socket authentication ==== | ||
| update mysql.user set plugin='' | update mysql.user set plugin='' | ||
| flush privileges; | flush privileges; | ||
| - | ===== Update password | + | ==== Update password ==== |
| update mysql.user set password=password(' | update mysql.user set password=password(' | ||
| Line 12: | Line 14: | ||
| - | ===== Check ===== | + | ==== Check ==== |
| select user, | select user, | ||
| MariaDB [(none)]> | MariaDB [(none)]> | ||
| Line 20: | Line 22: | ||
| | root | localhost | *C3F43AFF2CF6AACD60EE1AAB1B48ADB3066E0EA4 | | | | root | localhost | *C3F43AFF2CF6AACD60EE1AAB1B48ADB3066E0EA4 | | | ||
| +------+-----------+-------------------------------------------+--------+ | +------+-----------+-------------------------------------------+--------+ | ||
| + | |||
| + | ===== Debian 11 ===== | ||
| + | |||
| + | This will disable unix socket authentication as well as set the password to ' | ||
| + | ~# mysql -u root -e "ALTER USER ' | ||
| + | |||
| + | ==== Check ==== | ||
| + | |||
| + | <code sql> | ||
| + | MariaDB [(none)]> | ||
| + | +---------------------------------------------------------------------------------------------------+ | ||
| + | | CREATE USER for root@localhost | ||
| + | +---------------------------------------------------------------------------------------------------+ | ||
| + | | CREATE USER `root`@`localhost` IDENTIFIED BY PASSWORD ' | ||
| + | +---------------------------------------------------------------------------------------------------+ | ||
| + | 1 row in set (0.001 sec) | ||
| + | </ | ||
| ====== Tested on ====== | ====== Tested on ====== | ||
| - | * Debian 10.8 | + | * Debian 10.8, 10.3.27-MariaDB-0+deb10u1 |
| - | * 10.3.27-MariaDB-0+deb10u1 | + | * Debian 11. 10.5.12-MariaDB-0+deb11u1 Debian 11 |
| ====== See also ====== | ====== See also ====== | ||
wiki/mariadb_reenable_password_authentication.1615215196.txt.gz · Last modified: by antisa
