mariadbHow to install Mariadb on Arch linux?
- Install Mariadb on Arch Linux using the
pacman
package manager:
sudo pacman -S mariadb
- After installation, initialize the database:
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- Start the MariaDB service:
sudo systemctl start mariadb
- Secure the installation by running the
mysql_secure_installation
script:
sudo mysql_secure_installation
- To enable MariaDB to start on boot, run:
sudo systemctl enable mariadb
Detailed explanation:
-
sudo pacman -S mariadb
: This command installs the MariaDB package from the Arch Linux repository. -
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
: This command initializes the MariaDB database. -
sudo systemctl start mariadb
: This command starts the MariaDB service. -
sudo mysql_secure_installation
: This command runs themysql_secure_installation
script, which sets up a root password and removes anonymous users and test databases. -
sudo systemctl enable mariadb
: This command enables MariaDB to start on boot.
Helpful links
More of Mariadb
- What type to use for a year in Mariadb?
- How to work with XML in Mariadb?
- How to use variables in Mariadb?
- How to list users in Mariadb?
- Mariadb procedure example
- How to get current year in Mariadb?
- How to get yesterday's date in Mariadb?
- How to change wait_timeout in Mariadb?
- How to use XA transactions in Mariadb?
- How to use xtrabackup in Mariadb?
See more codes...