MySQL on Manjaro 🐬

Rishi Banerjee
3 min readDec 27, 2019

--

The pain has been real. It has been a haunting experience for me to get MySQL up and running on my Linux Machine. Well its not something ordinary and normal like Ubuntu. It’s Arch.

Regret my decision of installing it on my machine in the first place.

Nonetheless when you don’t have any way of installing a new OS and there is a lot of work trying to fit itself in your tiny time schedule, you are officially fucked.

*Cries in Spider*

We should now get straight to the point of actually starting the installation process. I’ve been at this for a week, browsing through arch manuals and nothing seemed to work. So this hopefully becomes a one stop guide for you on how to install and configure MariaDB/MySQL on your much hated/loved Linux machine ;)

There are two commands that you can start with. Get options or just start with MariaDB.

“MariaDB is a community-developed fork of the MySQL relational database management system, the impetus being the community maintenance of its free status under the GNU GPL.”

$ sudo pacman -S mysql or $ sudo pacman -S mariadb

The first command leads you to these two options

Press “1” for MariaDB xD

So doing this, gets the download and installation started.

Now, this is the main point. If this ends up throwing errors and shows “RED TEXTS” telling you there are conflicting/missing packages like GLIBCXX_3.4.26, I’m really sorry mate, you’ll be needing a whole system update. That is the major hiccup I hate having during the times of crisis. Tried every other option to fix it. Some thread even told me I needed to modify my “grub” config to fix MySQL. I’ve been there, fucked my machine and my life came to a halt for 3 whole days. See, I am no Linux genius, but I feel grub has nothing to do with MySQL.

Okay then, moving ahead.

$ sudo systemctl start mysqld

This might be throwing an error, something UGLY. Like this.

Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.

If you had this, then simply just initialize the directory with this command.

$ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

If you get something like

Installing MariaDB/MySQL system tables in ‘/var/lib/mysql’ 


on your terminal, then congratulations you are officially unfucked 🎉

After this things are pretty simple.

sudo systemctl start mysqld && sudo mysql_secure_installation

You will be prompted with configuration questions and passwords that you would like to use. Set them up and you are done. Go create the SQL Table you were trying to create all day long.

Hope this helps all the Manjaro newbies đŸ‘¶

--

--