mariaDB 설치 및 기본설정
mariaDB 설치
(base) user@user-B365M-DS3H:~$ sudo apt-get install -y mariadb-server
mariaDB 접속, 버전 확인
(base) user@user-B365M-DS3H:~$ sudo mysqladmin password 123123
(base) user@user-B365M-DS3H:~$ sudo mysql -u root -p
Enter password: 123123
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.1.47-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
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)]> select version();
+----------------------------------+
| version() |
+----------------------------------+
| 10.1.47-MariaDB-0ubuntu0.18.04.1 |
+----------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> create database test;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> use test;
Database changed
MariaDB [(none)]> create user 'bit' identified by '123123';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> select Host, User from mysql.user;
+-----------+------+
| Host | User |
+-----------+------+
| % | bit |
| localhost | root |
+-----------+------+
2 rows in set (0.00 sec)
MariaDB [(none)]> grant all privileges on test.* to 'bit'@'%';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show grants for 'bit'@'%';
+----------------------------------------------------------------------------------------------------+
| Grants for bit@% |
+----------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'bit'@'%' IDENTIFIED BY PASSWORD '*E56A114692FE0DE073F9A1DD68A00EEB9703F3F1' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'bit'@'%' |
+----------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
MariaDB [test]> exit
Bye
Author And Source
이 문제에 관하여(mariaDB 설치 및 기본설정), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://velog.io/@bangsy/mariaDB-설치-및-기본설정
저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
(base) user@user-B365M-DS3H:~$ sudo apt-get install -y mariadb-server
(base) user@user-B365M-DS3H:~$ sudo mysqladmin password 123123
(base) user@user-B365M-DS3H:~$ sudo mysql -u root -p
Enter password: 123123
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.1.47-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
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)]> select version();
+----------------------------------+
| version() |
+----------------------------------+
| 10.1.47-MariaDB-0ubuntu0.18.04.1 |
+----------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> create database test;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> use test;
Database changed
MariaDB [(none)]> create user 'bit' identified by '123123';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> select Host, User from mysql.user;
+-----------+------+
| Host | User |
+-----------+------+
| % | bit |
| localhost | root |
+-----------+------+
2 rows in set (0.00 sec)
MariaDB [(none)]> grant all privileges on test.* to 'bit'@'%';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show grants for 'bit'@'%';
+----------------------------------------------------------------------------------------------------+
| Grants for bit@% |
+----------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'bit'@'%' IDENTIFIED BY PASSWORD '*E56A114692FE0DE073F9A1DD68A00EEB9703F3F1' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'bit'@'%' |
+----------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
MariaDB [test]> exit
Bye
Author And Source
이 문제에 관하여(mariaDB 설치 및 기본설정), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@bangsy/mariaDB-설치-및-기본설정저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)