Jump to content

MariaDB:Installasi

From Wiki
Revision as of 10:08, 9 September 2022 by Kangtain (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<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.

<syntaxhighlight lang="shell"> systemctl status mariadb </syntaxhighlight>

Output:

<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:

<syntaxhighlight lang="shell"> sudo systemctl start mariadb </syntaxhighlight>

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.

<syntaxhighlight lang="shell"> sudo mysql_secure_installation </syntaxhighlight>

Terkait

Source