Preloader image
DDD

데이터베이스

MariaDB 10.5 - 사용자 생성 및 권한 부여

작성자 관리자 (admin)
조회수 3,686
입력일 2021-03-13 11:16:10

Setting environment for MariaDB 10.5 (x64)

C:\Windows\System32>mysql -u root -p
Enter password: ********
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.5.9-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)]> create user 'khan666'@'localhost' identified by 'wogus456';
Query OK, 0 rows affected (0.011 sec)

MariaDB [(none)]> grant all privileges on *.* to khan666@localhost;
Query OK, 0 rows affected (0.003 sec)

MariaDB [(none)]> grant all privileges on khan666 to khan666@localhost;
ERROR 1046 (3D000): No database selected

MariaDB [(none)]> grant all privileges on khan666.* to khan666@localhost;
Query OK, 0 rows affected (0.010 sec)

MariaDB [(none)]>

^