1

I recently installed a Koha Library on Ubuntu VServer 16.04 with MariaDB 10.31. Everything ran smoothly until the Root restarted: Now I get: Software error:

DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1492. at /usr/share/koha/lib/Koha/Database.pm line 100

When i try to connect to the Site. I checked instantly if MySQL is running and it doesnt. So i tried to restart it - but i get an error

mysql status: mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled) Active: failed (Result: exit-code) since Mi 2017-10-18 20:08:06 CEST; 1min 26s ago Docs: man:systemd-sysv-generator(8) Process: 4640 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE) Okt 18 20:07:36 h273239.stratoserver.net mysqld[4815]: 171018 20:07:36 [Note] InnoDB: Shutdown completed; log sequence number 19026477 Okt 18 20:07:36 h273239.stratoserver.net mysqld[4815]: 171018 20:07:36 [Note] /usr/sbin/mysqld: Shutdown complete Okt 18 20:07:36 h273239.stratoserver.net mysqld[4815]: Okt 18 20:07:36 h273239.stratoserver.net mysqld_safe[4850]: mysqld from pid file /var/run/mysqld/mysqld.pid ended Okt 18 20:08:06 h273239.stratoserver.net /etc/init.d/mysql[5123]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Okt 18 20:08:06 h273239.stratoserver.net /etc/init.d/mysql[5123]: [61B blob data] Okt 18 20:08:06 h273239.stratoserver.net /etc/init.d/mysql[5123]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld /mysqld.sock' (111 "Connection refused")' Okt 18 20:08:06 h273239.stratoserver.net /etc/init.d/mysql[5123]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Okt 18 20:08:06 h273239.stratoserver.net /etc/init.d/mysql[5123]: Okt 18 20:08:06 h273239.stratoserver.net mysql[4640]: ...fail! 

because we are a small NGO we cant pay for professional help - so you guys are my last resort - thanks in advance!

1 Answer 1

0

Try executing the following commands:

  • systemctl stop mysql.service; systemctl stop mysql.socket
  • killall mysqld
  • rm -f /var/run/mysqld/mysqld.sock
  • systemctl start mysql

Does it change anything? If not, please post the your last 100 lines of /var/log/messages (with tail -n 100)

4
  • Hi shodanshok, i tried: but i get: root@h273239:~# tail -n 100 /var/log/messages tail: cannot open '/var/log/messages' for reading: No such file or directory Commented Oct 18, 2017 at 19:38
  • This is what i get when i enter your suggested commands: root@h273239:~# systemctl stop mysql.service root@h273239:~# systemctl stop mysql.socket Failed to stop mysql.socket: Unit mysql.socket not loaded. root@h273239:~# killall mysqld mysqld: no process found root@h273239:~# rm -f /var/run/mysqld/mysqld.sock root@h273239:~# systemctl mysql start Unknown operation mysql. Commented Oct 18, 2017 at 19:40
  • I mistyped the last command; try with systemctl start mysql Commented Oct 18, 2017 at 21:32
  • On .deb based systems it's /var/log/syslog, not /var/log/messages. Commented Apr 11, 2020 at 10:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.