Jump to content

MariaDB:Installasi: Difference between revisions

From Wiki
No edit summary
No edit summary
 
(One intermediate revision 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
              <nowiki>https://mariadb.com/kb/en/library/systemd/</nowiki>
      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==

Latest revision as of 10:08, 9 September 2022

sudo apt install mariadb-server mariadb-client

After it’s installed, MariaDB server should be automatically stared. Use systemctl to check its status.

systemctl status mariadb

Output:

 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

If it’s not running, start it with this command:

sudo systemctl start mariadb

To enable MariaDB to automatically start at boot time, run

sudo systemctl enable mariadb

Now run the post installation security script.

sudo mysql_secure_installation

Terkait

Source