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 check version of Mariadb?
- How to work with XML in Mariadb?
- How to use window functions in Mariadb?
- How to use variables in Mariadb?
- How to use the WITH clause in Mariadb?
- How to remove user from Mariadb?
- How to list users in Mariadb?
- How to get current year in Mariadb?
- How to install Mariadb on Ubuntu?
See more codes...