MariaDB:Installasi: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
sudo apt install mariadb-server mariadb-client
<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.
systemctl status mariadb
 
<syntaxhighlight lang="shell">
systemctl status mariadb
</syntaxhighlight>


Output:
Output:
  ● mariadb.service - MariaDB 10.3.22 database server
  <syntaxhighlight lang="shell">
      Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
● mariadb.service - MariaDB 10.3.22 database server
      Active: active (running) since Fri 2020-04-10 14:19:16 UTC; 18s ago
    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
        Docs: man:mysqld(8)
    Active: active (running) since Fri 2020-04-10 14:19:16 UTC; 18s ago
              https://mariadb.com/kb/en/library/systemd/
      Docs: man:mysqld(8)
    Main PID: 9161 (mysqld)
            https://mariadb.com/kb/en/library/systemd/
      Status: "Taking your SQL requests now..."
  Main PID: 9161 (mysqld)
      Tasks: 31 (limit: 9451)
    Status: "Taking your SQL requests now..."
      Memory: 64.7M
      Tasks: 31 (limit: 9451)
      CGroup: /system.slice/mariadb.service
    Memory: 64.7M
              └─9161 /usr/sbin/mysqld
    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:
sudo systemctl start mariadb
 
<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
sudo systemctl enable mariadb
 
<syntaxhighlight lang="shell">
sudo systemctl enable mariadb
</syntaxhighlight>


Now run the post installation security script.
Now run the post installation security script.
sudo mysql_secure_installation
 
<syntaxhighlight lang="shell">
sudo mysql_secure_installation
</syntaxhighlight>


==Terkait==
==Terkait==