Last Modified 2025.5.24
우분투에 MariaDB 설치
sudo apt install mariadb-server
설치 후, 보안 스크립트 실행
sudo mysql_secure_installation
아래처럼 설정
Enter current password for root (enter for none): <just press ENTER> Switch to unix_socket authentication [Y/n] n Change the root password? [Y/n] n Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] Y Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y
사용법:
sudo mysql
use mysql show tables;
참고: mysql --user=root --password mysql 명령으로 접속할 수 없다.
MySQL JDBC 드라이버를 그대로 사용할 수 있다.
<!-- https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.3.0</version>
</dependency>
참고
