Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PetroGromovo's avatar

How to start MariaDB in laravel app ?

Having a big expierence with MySql I need to move my laravel 9 app to MariaDB Could you please to provide short description / to point to good docs : a) how to install MariaDB on ubuntu ? b) How to install and use MariaDB in laravel app ? c) Which are advantages of MariaDB in comparison with Mysql in laravel app and for which type of atsks/apps ?

Sure, I did searched in net and drowned in data...

Thanks in advance!

0 likes
3 replies
PetroGromovo's avatar

Thank you! I have installed MariaDB locally, but I have lost access to my mysql database... Can I have installed MariaDB and mysql both on my ubuntu 22.04 ? if you are using MariaDB in which cases do you prefer it ?

PetroGromovo's avatar

I try to remove mariaDB and restore mysql For this in console I removed mariaDB and reinstalled mysql, but I got error when try to emter mysql console :

 mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Any hints how to restore it quickly ?

Please or to participate in this conversation.