I had manually installed mysql server (for Kodi) via apt-get.
All was seemed fine (my Db was working via Kodi and life was good).
I had installed MySQL Plugin AS WELL (I cannot remember why) but all seemed to be working fine.
Today, I needed to unmount one drive so began taking the various services offline including mySQL plugin.
And now the mysql server want start.
I uninstalled everything using:
dpkg -l | grep -i mysql
mkdir -p /var/lib/mywebsql
apt-get remove --purge mysql\*
apt-get clean
rm -R /var/lib/mysql
rm -R /etc/mysql
dpkg -l | grep -i mysql
Then, Installed the OMV mysql plugin. Installed went fine.
But, when I change the plugin settings via the GUI (to change the bind address to OMV's IP address for example) and save & apply, I get an error:
And the server just does not start.
If I try to manually start it via command line, I get:
root@OMV:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
root@OMV:~#
What is wrong and what can I do to resolve ?
UPDATE:
Some how, OMV plugin GUI for MySQL is out of sync with what mysql is actually doing.
I just checked the processes related to mysql:
root@OMV:~# ps aux | grep mysql | grep -v grep
root 17395 0.0 0.0 4188 656 ? S 16:14 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 17759 0.8 0.5 420776 47732 ? Sl 16:14 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/media/cb48ff4f-08f7-499f-b5ca-9713f8571f49/mysql/ --plugin-dir=/usr/lib/mysql/plugin --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root 17760 0.0 0.0 4096 616 ? S 16:14 0:00 logger -t mysqld -p daemon.error
root@OMV:~#
Now, if I KILL the mysqld process 17759, then go back to the OMV GUI, I can apply then changes and it starts the sql server.
If I check the status of mysql, I get an error:
root@OMV:~# /etc/init.d/mysql status
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
.
root@OMV:~#
Not sure if that's the problem ?