728x90
출처
MySQL function 관련 에러 log_bin_trust_function_creators
리눅스 버전 확인
bluesanta@bluesanta-B550M-Pro-RS:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
bluesanta@bluesanta-B550M-Pro-RS:~$ free -h
total used free shared buff/cache available
Mem: 31Gi 799Mi 29Gi 33Mi 1.4Gi 30Gi
Swap: 8.0Gi 0B 8.0Gi
패키지 목록 업데이트
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo apt update
MySQL 서버 설치
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo apt install mysql-server -y
서비스 상태 확인
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
Active: active (running) since Mon 2026-01-26 10:08:48 KST; 59s ago
Process: 13311 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 13334 (mysqld)
Status: "Server is operational"
Tasks: 38 (limit: 154287)
Memory: 363.8M (peak: 378.9M)
CPU: 535ms
CGroup: /system.slice/mysql.service
└─13334 /usr/sbin/mysqld
1월 26 10:08:48 bluesanta-B550M-Pro-RS systemd[1]: Starting mysql.service - MySQL Community Server...
1월 26 10:08:48 bluesanta-B550M-Pro-RS systemd[1]: Started mysql.service - MySQL Community Server.
MySQL 버전 확인
bluesanta@bluesanta-B550M-Pro-RS:~$ mysql --version
mysql Ver 8.0.44-0ubuntu0.24.04.2 for Linux on x86_64 ((Ubuntu))
MySQL 접속 및 관리
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.44-0ubuntu0.24.04.2 (Ubuntu)
Copyright (c) 2000, 2025, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
데이터베이스 목록 조회
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
root 암호 번경
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'sqldba!Q@W#E';
Query OK, 0 rows affected (0.01 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> EXIT;
Bye
Database, 사용자 생성
mysql> CREATE DATABASE holy_scriptures DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
Query OK, 1 row affected (0.00 sec)
mysql> CREATE USER 'bible_admin'@'localhost' IDENTIFIED BY 'your_password123!';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON holy_scriptures.* TO 'bible_admin'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
외부 접속 허용
my.cnf 확인
bluesanta@bluesanta-B550M-Pro-RS:~$ cat /etc/mysql/my.cnf
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
mysqld.cnf 수정
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address, mysqlx-bind-address 수정
bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0
log_bin_trust_function_creators 추가
[mysqld]
log_bin_trust_function_creators = 1
서비스를 재시작
bluesanta@bluesanta-B550M-Pro-RS:~$ sudo systemctl restart mysql728x90