MySQL on Manjaro đŹ
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.
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
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 đ¶