MariaDB:Installasi: Difference between revisions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<syntaxhighlight lang="shell"> | |||
sudo apt install mariadb-server mariadb-client | |||
</syntaxhighlight> | |||
After it’s installed, MariaDB server should be automatically stared. Use systemctl to check its status. | After it’s installed, MariaDB server should be automatically stared. Use systemctl to check its status. | ||
<syntaxhighlight lang="shell"> | |||
systemctl status mariadb | |||
</syntaxhighlight> | |||
Output: | Output: | ||
● mariadb.service - MariaDB 10.3.22 database server | <syntaxhighlight lang="shell"> | ||
● mariadb.service - MariaDB 10.3.22 database server | |||
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) | |||
Active: active (running) since Fri 2020-04-10 14:19:16 UTC; 18s ago | |||
Docs: man:mysqld(8) | |||
https://mariadb.com/kb/en/library/systemd/ | |||
Main PID: 9161 (mysqld) | |||
Status: "Taking your SQL requests now..." | |||
Tasks: 31 (limit: 9451) | |||
Memory: 64.7M | |||
CGroup: /system.slice/mariadb.service | |||
└─9161 /usr/sbin/mysqld | |||
</syntaxhighlight> | |||
If it’s not running, start it with this command: | If it’s not running, start it with this command: | ||
<syntaxhighlight lang="shell"> | |||
sudo systemctl start mariadb | |||
</syntaxhighlight> | |||
To enable MariaDB to automatically start at boot time, run | To enable MariaDB to automatically start at boot time, run | ||
<syntaxhighlight lang="shell"> | |||
sudo systemctl enable mariadb | |||
</syntaxhighlight> | |||
Now run the post installation security script. | Now run the post installation security script. | ||
<syntaxhighlight lang="shell"> | |||
sudo mysql_secure_installation | |||
</syntaxhighlight> | |||
==Terkait== | ==Terkait== | ||