mariadb_user
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| mariadb_user [2023/07/05 16:27] – [Création] pascal | mariadb_user [2023/07/05 19:13] (Version actuelle) – [Configuration] pascal | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Gestion des utilisateurs mariaDB ====== | ====== Gestion des utilisateurs mariaDB ====== | ||
| - | ===== Création ===== | + | ===== Création |
| <code bash> | <code bash> | ||
| - | MariaDB [(none)]> | + | MariaDB [(none)]> |
| Query OK, 0 rows affected (0,003 sec) | Query OK, 0 rows affected (0,003 sec) | ||
| + | </ | ||
| + | <code bash> | ||
| + | MariaDB [(none)]> | ||
| + | Reading table information for completion of table and column names | ||
| + | You can turn off this feature to get a quicker startup with -A | ||
| + | |||
| + | Database changed | ||
| </ | </ | ||
| <code bash> | <code bash> | ||
| Ligne 15: | Ligne 22: | ||
| | 10.% | foo | *2470C0C02FEE4B9D15ADC618B6DD1900A2EC9E19 | | | 10.% | foo | *2470C0C02FEE4B9D15ADC618B6DD1900A2EC9E19 | | ||
| +-----------+-------------+-------------------------------------------+ | +-----------+-------------+-------------------------------------------+ | ||
| - | 6 rows in set (0,002 sec) | + | 4 rows in set (0,002 sec) |
| </ | </ | ||
| - | ===== Suppression ===== | + | ===== Connexion d'un user ===== |
| + | ==== 127.0.0.1 ==== | ||
| + | <code bash> | ||
| + | root:~# mariadb -u foo -ppassword | ||
| + | ERROR 1045 (28000): Access denied for user ' | ||
| + | </ | ||
| + | ==== 10.1.40.1 ==== | ||
| + | <code bash> | ||
| + | root:~# mariadb -u foo -ppassword -h 10.1.40.1 | ||
| + | Welcome to the MariaDB monitor. | ||
| + | Your MariaDB connection id is 1350 | ||
| + | Server version: 10.11.3-MariaDB-1 Debian 12 | ||
| + | |||
| + | Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. | ||
| + | |||
| + | Type ' | ||
| + | </ | ||
| + | ===== Suppression | ||
| <code bash> | <code bash> | ||
| MariaDB [(none)]> | MariaDB [(none)]> | ||
| - | Query OK, 0 rows affected (0,003 sec) | + | Query OK, 0 rows affected (0,002 sec) |
| + | </ | ||
| + | <code bash> | ||
| + | MariaDB [(none)]> | ||
| + | Reading table information for completion of table and column names | ||
| + | You can turn off this feature to get a quicker startup with -A | ||
| + | |||
| + | Database changed | ||
| </ | </ | ||
| <code bash> | <code bash> | ||
| MariaDB [mysql]> select Host, User, Password from user; | MariaDB [mysql]> select Host, User, Password from user; | ||
| - | +-----------+-------------+-------------------------------------------+ | + | +-----------+-------------+----------+ |
| - | | Host | User | Password | + | | Host | User | Password | |
| - | +-----------+-------------+-------------------------------------------+ | + | +-----------+-------------+----------+ |
| - | | localhost | mariadb.sys | | + | | localhost | mariadb.sys | | |
| - | | localhost | root | invalid | + | | localhost | root | invalid |
| - | | localhost | mysql | invalid | + | | localhost | mysql | invalid |
| - | +-----------+-------------+-------------------------------------------+ | + | +-----------+-------------+----------+ |
| 3 rows in set (0,002 sec) | 3 rows in set (0,002 sec) | ||
| + | </ | ||
| + | ===== Configuration ===== | ||
| + | En parallèle, il faut que le serveur accepte les connections venant du réseau local. | ||
| + | <code bash file=/ | ||
| + | [mysqld] | ||
| + | # Instead of skip-networking the default is now to listen only on | ||
| + | # localhost which is more compatible and is not less secure. | ||
| + | bind-address | ||
| </ | </ | ||
| ===== Sources ===== | ===== Sources ===== | ||
| - | * [[https:// | + | |
| + | *[[https:// | ||
| Ligne 40: | Ligne 80: | ||
| ===== Sujets connexes ===== | ===== Sujets connexes ===== | ||
| * [[mariadb|Installation de mariaDB]] | * [[mariadb|Installation de mariaDB]] | ||
| + | * [[mariadb_grant|Gestion des autorisations]] | ||
mariadb_user.1688574421.txt.gz · Dernière modification : 2023/07/05 16:27 de pascal