How to Install and configure MySQL on Arch-based Linux Distributions(Manjaro)
Last Updated :
23 Jul, 2025
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
Step 2: Install MySQL from the official repository using pacman package manager
$ 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
$ 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.
$ sudo mysql_secure_installation
Step 2: Now, log into the MySQL command-line interface as the root user.
$ 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.
> 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
Similar Reads
How to install and configure Docker on Arch-based Linux Distributions(Manjaro) ? 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 platform used for building, running, and managing applications in an isolated environment. A container is isolated from another and bundles its softwa
2 min read
How to Install mongodb on Arch-based Linux Distributions(Manjaro) In this article, we are going to see how to install the MongoDB server on Arch-based Linux Distributions. We are going to use the Yay AUR helper, which is one of the many AUR helpers that can be used to install MongoDB or any other AUR package. Installation of MongoDB Step 1: Update and upgrade your
2 min read
Installing and configuring Jenkins on Arch-based Linux Distributions (Manjaro) Jenkins is an open-source, cross-platform automation server that is used to build, test and deploy software. It simplifies and accelerates Continuous Integration/Continuous Delivery (CI/CD) environments by creating jobs, scripts, and pipelines. The application is primarily written in Java and requir
2 min read
How to install Brave Browser on Arch-based Linux Distributions(Manjaro) ? Brave is a free, open-source cross-platform web browser developed and maintained by Brave Software Incorporation. With Brave, you can keep your browsing activity private by automatically disabling website trackers and blocking advertisements. It is built on top of Chromium, which is an open-source v
2 min read
How to install Postman on Arch-based Linux Distributions(Manjaro)? Postman is an HTTP client used to build, test, and modify APIs. It provides a graphical user interface through which developers can generate various types of HTTP requests like GET, POST, PUT, PATCH, and DELETE. It is used by more than 20 million developers across the globe to develop RESTful APIs.
1 min read
How to Install PostgreSQL on Arch-based Linux Distributions (Manjaro) PostgreSQL (often called Postgres) is a free, open-source, and advanced relational database management system and is developed by The PostgreSQL Global Development Group. It is primarily written in the C Programming Language. In addition to SQL (relational) querying, Postgres also supports JSON (non
2 min read