mysql 1.0.16 failing install

  • Hi All


    I'm having issues with mysql plugin, when I go to (re)install it, the plugin installs but when I try to enable I get this error:



    Any ideas or suggestions gratefully received...

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

    • Offizieller Beitrag

    mysql seems to be more sensitive than ever lately. I would only do the following if you don't have a database to lose.


    Code
    apt-get purge mysql-server-5.5 mysql-server-core-5.5 mysql-common
    apt-get autoremove
    rm -rfv /etc/mysql
    rm -rfv /var/lib/mysql
    reboot
    userdel mysql


    Then reinstall.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • Thanks for the advice.
    I'm not sure if it is related but the issue started after I installed flashmemory (fs2ram). I've removed flashmemory now and followed your instructions to blow away mysql.


    But I get the same error when enabling mysql after the install


    Looking into syslog


    Code
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'


    Seems to occur when trying to start mysqld

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

    Einmal editiert, zuletzt von the_otherOne ()

    • Offizieller Beitrag

    Did you pick the same shared folder as before? I forgot to mention I would create a new shared folder in case any problem causing files were still in that folder.


    I doubt fs2ram caused any problems. I have mysql and fs2ram working on same server.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

    • Offizieller Beitrag

    Using the old shared folder may have messed things up. I would go through my steps again with another new shared folder. This whole problem is why we are thinking about removing the database location from the plugin.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • I went back through all steps with a new share folder (and my old one deleted) but the issue of the enable failed was the same
    syslog says

    Code
    Mar 13 19:13:24 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
    Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 13 19:13:30 omv /etc/init.d/mysql[9081]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Mar 13 19:13:30 omv /etc/init.d/mysql[9081]:


    I may have to rebuild this server from scratch, darn.

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

    • Offizieller Beitrag

    Uninstall everything again using instructions. Then install just mysql from command line - apt-get install mysql-server. Install plugin from OMV web interface. Let me know if that works.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | 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!

  • Same error on enable

    Code
    Error #4000:
    exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
    invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
    Stack trace:



    tail of syslog

    Code
    Mar 13 20:31:37 omv mysqld: 150313 20:31:37 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
    Mar 13 20:31:38 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
    Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 13 20:31:44 omv /etc/init.d/mysql[10627]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Mar 13 20:31:44 omv /etc/init.d/mysql[10627]:


    That is also with a new clean share and installing from the command line using pw:openmediavault

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

  • If I purge, create a new clean share, reboot and remove user mysql.
    Then apt-get install mysql-server I get a working mysql.
    but when I install the plugin and pick just the data share (not enable) and click save I get an "error has occurred" in the web gui.


    So Its moving the files that is causing the error.


    Note: after the move I get
    s -lart
    total 12
    drwxrwsr-x+ 2 root users 4096 Mar 14 10:05 .
    drwxrwx---+ 32 www-data www-data 4096 Mar 14 10:05 ..


    In the mysqldb directory

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

  • I've created a share without ACL on the root data drive and re installed mysql as outlined earlier.
    Even with this I still get


    Code
    Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
    Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
    Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [Note] Server socket created on IP: '127.0.0.1'.
    Mar 14 12:17:02 omv mysqld: 150314 12:17:02 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
    Mar 14 12:17:02 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
    Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 14 12:17:15 omv /etc/init.d/mysql[11476]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Mar 14 12:17:15 omv /etc/init.d/mysql[11476]:


    When I try and start the service.

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

  • I followed Eddys guide to removing mysql from this thread pointed to by tekkb (thanks)


    Before installing the mysql plugin the mysql share (newly created) is ls -lart

    Code
    drwxr-sr-x  2 root users 4096 Mar 14 14:46 .
    drwxrws--- 32 root users 4096 Mar 14 14:46 ..


    Now when setting the plugin to the share (not enable) I get a message that an error has occurred
    and no files are placed in the share

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

  • Cleanly reinstalled
    share newly made

    Code
    drwxr-sr-x  2 mysql users 4096 Mar 14 15:18 .
    drwxrws--- 32 root  users 4096 Mar 14 15:18 ..


    ownership/perms set


    mysql plugin installed from the web interface (installs cleanly and stop/starts the service fine)


    set bind to 0.0.0.0 and data directory to share (with perms/owner) but not setting enable, this now executes with no error


    set enable and save :


    Tail of syslog

    Code
    Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [Note] Server socket created on IP: '0.0.0.0'.
    Mar 14 15:34:06 omv mysqld: 150314 15:34:06 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
    Mar 14 15:34:07 omv mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
    Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 14 15:34:19 omv /etc/init.d/mysql[9897]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Mar 14 15:34:19 omv /etc/init.d/mysql[9897]:


    Same as before.


    Note: I have noticed that plexmediaserver has stopped working and when I try a reinstall that also fails (no errors given), not sure if it is related (but thats another service with a moved data directory)...


    P.S. thanks for the help

    HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64

    • Offizieller Beitrag

    drwxrws--- 32 root users 4096 Mar 14 15:18 ..


    That is the directory above the mysql folder, why is 770!!? Nobody other than root and users can see directories in the uuid mounted path. That leaves out any other service including plex to read at least contents there.


    The default mount path is always root:root 755, change the permission of the mount path where mysql is located. Don't do it recursively


    chmod 775 /media/uuid or chmod 755 /media/uuid/

Jetzt mitmachen!

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