[SOLVED] mysql will not start

  • 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:

    Code
    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:

    Code
    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:


    Code
    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:



    Code
    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 ?

    • Offizieller Beitrag

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thx for the pointers. I found the solution.
    The key was this post #37 followed by this post #47.


    In summary, I had to do the following commands:

    Code
    mysql_upgrade -u root -p
    GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '***********';

    where '***********' is the password in the file /etc/mysql/debian.cnf


    Now the OMV GUI for starting and stopping the MySQL service works and so does the command 'service mysql stop'.


    Many thanks for pointing me in the direction.

    HP Microserver N40L; OMV 6.1.1-1 (Shaitan)

    Einmal editiert, zuletzt von macnb ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!