¿Como hago para instalar MySQL en manjaro, cinnamon?

hola como hago para instalar MySQL en manjaro, cinnamon? si alguien me puede ayudar? lo intente pero olo me instalo el servidor grafico, pero lo borre pensando que lo habia hechho mal, ahora ya no se como instalarlo. Alguien puede brindarme ayuda? Muchas gracias.

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.


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.


Run the below command to see the list of available databases.


Source: geeksforgeeks

1 Like

muchas gracias!!!

ur welcome