——–<#start:SUMMARY >—————-
1. [brew 업데이트](#1.step)
>brew update
2. [mariaDB 설치](#2.step)
>brew install mariadb
3. [db 서버 실행](#3.step)
>mysql.server start
4. [mariaDB 접속 ](#DB.1 step)
MariaDB [mysql]> UPDATE user SET password = password(‘원하는비밀번호’) WHERE user = ‘root’;
> mysql -uroot -p******
5. [기본database 목록 확인 ](#DB.1 step)
> show databases;
6. [db선택, 테이블목록확인](#DB.2 step)
>use mysql;
>show tables;
7. [mysql table data 정보 조회](#DB.3. step)
>select * from user;
——–<#ene:SUMMARY >—————-
#1.step
>brew update
Updated 1 tap (homebrew/core).
==> New Formulae
bfgminer
circumflex
datatype99
dunamai
interface99
licensor
manifest-tool
meek
metalang99
mkp224o
pixiewps
protobuf@3
python-build
qsv
railway
sgn
snowflake
tea
xdg-ninja
==> Outdated Formulae
boost
gcc
isl
libidn2
librist
mbedtls
numpy
opencv
protobuf
pugixml
qt@5
rubberband
sqlite
tbb
unbound
vim
You have 16 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
#2.step
brew install mariadb
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/manifests/0.996-3
~~~ 중략 ~~~
MySQL is configured to only allow connections from localhost by default
To restart mariadb after an upgrade:
brew services restart mariadb
Or, if you don’t want/need a background service you can just run:
/usr/local/opt/mariadb/bin/mysqld_safe –datadir=/usr/local/var/mysql
==> Summary
/usr/local/Cellar/mariadb/10.8.3_1: 920 files, 187.5MB
==> Running `brew cleanup mariadb`…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> mariadb
A “/etc/my.cnf” from another install may interfere with a Homebrew-built
server starting up correctly.
MySQL is configured to only allow connections from localhost by default
To restart mariadb after an upgrade:
brew services restart mariadb
Or, if you don’t want/need a background service you can just run:
/usr/local/opt/mariadb/bin/mysqld_safe –datadir=/usr/local/var/mysql
3.step
mysql.server start
Starting MariaDB
/usr/local/bin/mysql.server: line 261: log_success_msg: command not found
#. connecting MariaDB
> open terminal
> mysql -uroot -p******
>>mariaDB console
#DB.1 step
> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
+——————–+
#DB.2 step
>show tables;
+—————————+
| Tables_in_mysql |
+—————————+
| column_stats |
| columns_priv |
| db |
| event |
| func |
| general_log |
| global_priv |
| gtid_slave_pos |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| index_stats |
| innodb_index_stats |
| innodb_table_stats |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| roles_mapping |
| servers |
| slow_log |
| table_stats |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| transaction_registry |
| user |
+—————————+
#DB.3. step
select * from user;
+———————————+————–+——————————————-+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———+————–+——————–+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | Delete_history_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | is_role | default_role | max_statement_time |
+———————————+————–+——————————————-+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———+————–+——————–+
| localhost | mariadb.sys | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | Y | N | | 0.000000 |
| localhost | root | ***************************************** | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | *1D76F05E1817727CCFEEEA2EAD2F21AE0766F9F8 | N | N | | 0.000000 |
| localhost | ************ | invalid | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | invalid | N | N | | 0.000000 |
| localhost | | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | | | N | N | | 0.000000 |
| bag-yongnam-ui-macbookpro.local | | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | | | N | N | | 0.000000 |
+———————————+————–+——————————————-+————-+————-+————-+————-+————-+———–+————-+—————+————–+———–+————+—————–+————+————+————–+————+———————–+——————+————–+—————–+——————+——————+—————-+———————+——————–+——————+————+————–+————————+———————+———-+————+————-+————–+—————+————-+—————–+———————-+———————–+——————————————-+——————+———+————–+——————–+