Ubuntu: Do I have two or more different setups of MySQL/MariaDB?



Question:

I've had a kind of annoying problem quite a while now. I run a Ubuntu 16.04 LTS Server for my own company at my own home. I also run a mariadb-server on this server, but a big problem is that when I try to check the mariadb-server status with

$ systemctl status mysqld  

I always get the following result.

root@srv:/home/dest/Desktop# systemctl status mysqld  ● mariadb.service - MariaDB 10.2.12 database server     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)    Drop-In: /etc/systemd/system/mariadb.service.d             â""â"€migrated-from-my.cnf-settings.conf     Active: failed (Result: exit-code) since Sat 2018-01-13 19:50:31 CET; 1h 24min ago       Docs: man:mysqld(8)             https://mariadb.com/kb/en/library/systemd/    Process: 11395 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)    Process: 11221 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl  set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=    Process: 11207 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)    Process: 11194 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)   Main PID: 11395 (code=exited, status=1/FAILURE)     Status: "MariaDB server is down"    Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [Note] InnoDB: Starting shutdown...  Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [ERROR] Plugin 'InnoDB' init function returned error.  Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.  Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [Note] Plugin 'FEEDBACK' is disabled.  Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [ERROR] Unknown/unsupported storage engine: InnoDB    Jan 13 19:50:31 srv.ddwn.se mysqld[11395]: 2018-01-13 19:50:31 140049780521152 [ERROR] Aborting  Jan 13 19:50:31 srv.ddwn.se systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE  Jan 13 19:50:31 srv.ddwn.se systemd[1]: Failed to start MariaDB 10.2.12 database server.  Jan 13 19:50:31 srv.ddwn.se systemd[1]: mariadb.service: Unit entered failed state.  Jan 13 19:50:31 srv.ddwn.se systemd[1]: mariadb.service: Failed with result 'exit-code'.  root@srv:/home/dest/Desktop#  

But when I try to connect to my mariadb-server by entering the following in the terminal:

$ mysql -u username -p password  

There is no problem whatsoever connecting to the local mariadb-server. All our web-apps which most of them uses the databases quite frequently never has any issues with connecting, saving or reading information from the databases at all. We also use phpmyadmin to connect to the database server and that works well too.

Now to our problems with this (if you haven't already figured it out):

We're not able to restart the server or reload the configurations if we have to make any changes or if the server for some reason not would be responsive. The only way we can restart the server is by actually restarting the entire server, which is a really big issue since many people rely on it for their both private and work contents and also several services that most users can't be without at all. That means that when we have to reboot the server when it's not a scheduled restart or maintenance windows we get loads of error reports from our users.

This is in turn making us write an e-mail to all users explaining what has happened, which all takes so much time that we could have put on some other more fun or useful task instead.

Is there anyone who has any idea of what this issue can be?

Oh, we forgot to mention that maybe 1-3 months ago we had a huge issue when trying to run

apt-get install program  

because it always ended in error because of just mariadb-server, I actually believe that we did a

apt remove --purge mariadb-server -y  

and that fixed the entire issue, except for being able to use the

systemctl status mysqld  

but we still could use our mariadb-server and all the web-apps we use still worked without any issues at all. This is a completely frustrating issue to me, I haven't heard of anything like this issue that we have, ever!

Please help me to solve this issue. And never hesitate to ask for logs or anything that you could need to solve the issue or at least to help us to try to narrow it down.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »