. MariaDB.repo setting
$ sudo vi /etc/yum.repos.d/MariaDB.repo
----------------------------------------------------------------
[mariadb]
name = MariaDB
baseurl = https://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
----------------------------------------------------------------
2. MariaDB Install
$ sudo yum install MariaDB-server MariaDB-client
3. MariaDB service start
$ sudo systemctl start mariadb
4. MariaDB service enable
$ sudo systemctl enable mariadb
5. MariaDB root login
$ sudo mariadb -u root
6. root password change (ex, password = 'password' <= your password change)
MariaDB [(none)]> set password = password('password');
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> exit
7. MariaDB root password login
$ mariadb -u root -p mysql
Enter password: <= password (or your changed password)
8. MariaDB root user remote access
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
or
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.%'
IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
9. Firewall mysql port(3306) add(permanently)
$ sudo firewall-cmd --permanent --add-port=3306/tcp
10. Firewall confirm
$ sudo vi /etc/firewalld/zones/public.xml
or
$ sudo cat /etc/firewalld/zones/public.xml
10. MariaDB client tool remote connect
HeidiSQL, SQuirrel SQL... etc
'OS > CentOS' 카테고리의 다른 글
CentOS 7 Clean yum cache (0) | 2020.11.24 |
---|---|
CentOS 7.9 (2009) Chrome Install (0) | 2020.11.24 |
Check CentOS Running Services (0) | 2020.09.09 |
Check CentOS version (0) | 2020.09.09 |
MariaDB yum repo setting (0) | 2020.06.22 |