2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
Shell Scripting Kali Linux Ubuntu Red Hat CentOS Docker in Linux Kubernetes in Linux Linux inte
How to Install and configure MySQL on Arch-based
Linux Distributions(Manjaro)
Last Updated : 03 May, 2023
MySQL is an open-source relational database management system
developed by Oracle based on structured query language (SQL). It is
primarily written in C and C++ programming languages and licensed under
the GNU Public License. The client-end API is used to query, filter, sort,
group, and modify data stored in the database table in the form of rows
and columns. This article is a step-by-step guide for installing and
configuring MySQL server on an Arch-based Linux system.
Installation of MySQL on Manjaro
Follow the below steps to install the MySQL database.
Step 1: We will update and upgrade our system by executing the
following command:
$ sudo pacman -Syu
[Link] 1/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
Step 2: Install MySQL from the official repository using pacman package
manager
[Link] 2/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
$ sudo pacman -S mysql
Step 3: Now, verify the installation by running the below command.
$ mysqld --version
Step 4: Run the following command before starting mysqld
[Link] 3/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
$ mariadb-install-db --user=mysql --basedir=/usr --
datadir=/var/lib/mysql
Step 5: Start the MySQL server by using the systemctl command.
$ sudo systemctl start mysqld
$ sudo systemctl status mysqld
Step 6: Once again use systemctl command to enable MySQL service.
After command execution, MySQL will restart whenever our machine
boots up.
$ sudo systemctl enable mysqld
Configuring MySQL on Manjaro
Follow the below steps to configure MySQL on Manjaro.
Step 1: Start the MySQL configuration script as the sudo user. In this step,
we’ll be prompted to change our MySQL installation’s security settings.
[Link] 4/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
$ sudo mysql_secure_installation
Step 2: Now, log into the MySQL command-line interface as the root user.
[Link] 5/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
$ sudo mysql
Step 3: Create a new user with the following command.
> CREATE USER ‘<username>’@’localhost’ IDENTIFIED BY
‘<password>’;
Step 4: Grant all privileges to the newly created user.
> GRANT ALL PRIVILEGES ON *.* TO ‘<username>’@’localhost’
WITH GRANT OPTION;
Step 5: Free up any cached memory and exit the MySQL client.
[Link] 6/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
> FLUSH PRIVILEGES;
> exit
Step 6: Now, log in with the newly created user.
> mysql -u testuser -p
Step 7: At this point, we have successfully installed and configured
MySQL on our Manjaro machine.
> CREATE DATABASE <dbname>;
Run the below command to see the list of available databases.
> SHOW DATABASES
[Link] 7/14
2/1/25, 10:44 AM How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro) - GeeksforGeeks
Master DevOps and also get 90% Course fee refund on completing
90% course in 90 days! Take the Three 90 Challenge today.
The most sought-after Three 90 challenge has started and this is your
chance to upskill and get 90% refund. What more motivation do you
need? Start the challenge right away!
Comment More info Advertise with us Next Article
How to install and configure
Docker on Arch-based Linux
Distributions(Manjaro) ?
Similar Reads
How to install and configure Docker on Arch-based Linux…
In this article, we are going to see how to install and configure Docker on
Arch-based Linux Distributions. Docker is an open-source containerization…
2 min read
[Link] 8/14