Mariadb error 2002

Lama tak terjun ke dunia database, ada pengaturan yang terlupakan sehingga muncul error.

$ mariadb -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local server through socket '/var/run/mysql/mysql.sock' (2)

Setelah dicek, ternyata service-nya belum jalan karena tidak executable.

$ ls -l /etc/rc.d|grep -iE "(maria|mysql)"
-rw-r--r-- 1 root     root   2517 May  2 09:08 rc.mysqld
-rw-r--r-- 1 root     root   2943 Aug  4  2020 rc.mysqld.orig

Mari aktifkan

# chmod +x /etc/rc.d/rc.mysqld
# /etc/rc.d/rc.mysqld start
210530 10:36:21 mysqld_safe Logging to '/var/lib/mysql/bumi.bumi.err'.
210530 10:36:21 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql

Done. Alhamdulillah

 Share!

 
comments powered by Disqus