MariaDB : 수동(zip 버전)설치

Database 2019.02.10 12:29 Posted by 파란크리스마스

출처

MariaDB 서비스 등록

C:\server\mysql\mariadb-10.3.12-winx64>bin\mysql_install_db --datadir=C:\server\mysql\mariadb-10.3.12-winx64\data --service="MariaDB" --port=3306 --password=xxxx
Running bootstrap
2019-02-10 12:39:34 0 [Note] C:\server\mysql\mariadb-10.3.12-winx64\bin\mysqld.exe (mysqld 10.3.12-MariaDB) starting as process 3784 ...
Removing default user
Setting root password
Creating my.ini file
Registering service 'MariaDB 10312'
Creation of the database was successful
C:\server\mysql\mariadb-10.3.12-winx64>

root 사용자 암호등록

C:\server\mysql\mariadb-10.3.12-winx64>bin\mysql -u root -p
Enter password: ******
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.12-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)]> use mysql;
Database changed

MariaDB [mysql]> select user, host from mysql.user;
+------+-----------+
| user | host      |
+------+-----------+
| root | 127.0.0.1 |
| root | ::1       |
| root | localhost |
+------+-----------+
3 rows in set (0.004 sec)

MariaDB [mysql]> alter user 'root'@'localhost' identified by 'sqldba';
Query OK, 0 rows affected (0.002 sec)

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.001 sec)