Also MySQL Problem with OMV 1.x

    • OMV 1.0
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Eddy, I gave you all commands used by me. I reached my limitation.
      in my case, mysql server was up and only the debian-sys-maint user did not have proper rights.
      in your case the mysql server does not start.

      good luck.
      The Power of the Power Button!
      OMV 2.x // Hardware: HP N36L Microserver (BIOS mod), 4GB RAM, 2x1TB WD Red + 2x2TB ST, 160GB for system
    • Hey! I made it!1 So a good friend made it for me ;d He's very good in coding ...

      WORKAROUND:

      First try to start:

      Source Code

      1. service mysql start


      it should fail

      try to remove it

      Source Code

      1. apt-get --purge remove mysql-server

      it will try to start again ... maybe a bug?! no plan!

      removing this dir

      Source Code

      1. rm /etc/mysql/ -r

      !!!!this is very important i think because OMV dont do this atomatically and also with apt-get --purge remove this dir isnt be removed!!!!!

      now list all packages

      Source Code

      1. dpkg -l | grep mysql


      removing all listed packages

      Source Code

      1. apt-get --purge remove php5-mysqlnd

      .
      .
      .
      .
      etc.

      check your job

      Source Code

      1. dpkg -l | grep mysql


      another check

      Source Code

      1. dpkg --get-selections | grep mysql


      nothing should be the output ... if something comes up try again to remove it with

      Source Code

      1. apt-get --purge remove [name of the package]


      now clean apt-get cache

      Source Code

      1. apt-get autoremove
      2. apt-get clean


      again removing this dir

      Source Code

      1. rm /etc/mysql/ -R


      and this

      Source Code

      1. rm /var/lib/mysql/ -r


      now check if everything is done

      Source Code

      1. ps -ax


      !!!REBOOT!!!

      and after Login in the Webinterface install MySQL-plugin
      Done!
    • Well done guide...but, still having issues over here. I can install from the main plugins directory, but, when attempting to log in as root, I'm getting access denied even though I use the password from /etc/mysql/debian.cnf. Additionally, I cannot seem to update the password from the UI.

      About to break down and just manage mysql in the background myself.

      By the way, went ahead and just created a script to uninstall since I'm not getting consistent behavior and continually installing for testing.

      Source Code

      1. #!/bin/bash
      2. # Remove the packages installed as of 12/10/2014
      3. apt-get --assume-yes --purge remove mysql-server
      4. apt-get --assume-yes --purge remove libdbd-mysql-perl
      5. apt-get --assume-yes --purge remove libmysqlclient18:amd64
      6. apt-get --assume-yes --purge remove mysql-client-5.5
      7. apt-get --assume-yes --purge remove mysql-common
      8. apt-get --assume-yes --purge remove mysql-server
      9. apt-get --assume-yes --purge remove mysql-server-5.5
      10. apt-get --assume-yes --purge remove mysql-server-core-5.5
      11. apt-get --assume-yes --purge remove openmediavault-mysql
      12. apt-get --assume-yes --purge remove php5-mysqlnd
      13. apt-get --assume-yes autoremove
      14. apt-get clean
      15. # Remove configuration files, etc.
      16. rm -R /etc/mysql
      17. rm -r /var/lib/mysql
      Display All
    • I spent now several hours on a fresh installed OMV to set up MySQL. I went through various Threads and tried to purge, remove, re-install etc. But the more I did, the more other problems I created. I stumbled across this thread and went through the very detailed description from Eddy. After that, I want to boot new and then install MySQL Plugin new. But booting hangs, I believe due to some corrupt shared Folder created during my attempts. I removed my HDD's and OMV was starting. Then I tried to wipe everything in regards of sharing. Edited config.xml but still I have fragments of this folders left (see picture)

      [Blocked Image: http://fs2.directupload.net/images/150318/temp/9scf2g7z.png]

      But now the system was booting again. And I installed MySQL Plugin new. I created then a new folder, hit save, activated MySQL, hit save. The result

      Source Code

      1. ​Fehler #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      6. #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      7. #2 /usr/share/openmediavault/engined/module/mysql.inc(117): OMVSysVInitScript->exec()
      8. #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleMySQL->startService()
      9. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      10. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All


      I am short before to give up, as I believe inbetween OMV is only for Professionals :(
    • Only for professionals? Because the mysql plugin is giving you problems? Don't give up so quickly. You are learning good information that is helpful when administering a NAS. If it makes you feel better, mysql on my qnap (before I put OMV on it) had issues as well.

      I can't consistently reproduce this bug. So, I don't know what to fix in the plugin. We have been discussing ideas. Give us a few days to come up with something.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I have to excuse, as I don't want to blame you guys! It's just frustration about my unability to get this working. I know it is an excellent piece of software and for free in addition. All the hoonors to the developers!
      Don't give up so quickly.

      Yes you are right and my learning curve s going up, so I will wait patiently until you come up with a solution. Can anybody inbetween give me a hint how I get rid of the shared folder fragments shown in the picture above?
    • Are any plugins still using those shared folders? If so, change the shared folder or remove the plugin. Then you might be able to delete them. If not, we can edit config.xml.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Are any plugins still using those shared folders? If so, change the shared folder or remove the plugin. Then you might be able to delete them. If not, we can edit config.xml.
      I don't think that any plugin use this folder except Mysql. As I said these folders were created at the try to install Mysql and I already worked half successful with config.xml, otherwise, you would see foldernames etc. But it seems, I have overseen something in config, or elsewhere.

      Can you go into the newly created shared directory and run ls -la

      I have to admit I am still a Linux Noob, as I am not able to get into this directory to run Ls -la. It should be in /dev/sda1, but when I try iot says "no valid directory" Maybe also a permission problem?
      However in extplorer I can see the directory and the permission colum there says 0(----------), the owner is mysql.
      Does that make sense?

      BTW Is postgresql an alternative to Mysql and if yes, is it easier to install? I haven't tried yet, because I want to avoid additional mess ;)
    • emsic wrote:

      I have to admit I am still a Linux Noob, as I am not able to get into this directory to run Ls -la. It should be in /dev/sda1, but when I try iot says "no valid directory" Maybe also a permission problem?
      However in extplorer I can see the directory and the permission colum there says 0(----------), the owner is mysql.
      Does that make sense?

      I'm not sure what the permissions on the folder are from extplorer.

      The data drive (which the shared folder should be on) is usually mounted in /media with a very long UUID something like mine would be
      /media/f0b65bdf-73b9-45bc-a3ac-a1a08541c1c6
      I access it by typing

      Source Code

      1. ​cd /media/f0*

      then cd into the data directory (share directory you created)

      Source Code

      1. cd mysql_data
      (in my case)

      retry accessing your shared directory this way and copy/paste the output of ls -la here

      Note: If you are using putty to access the server, simply drag over the output of ls -la to copy and then paste it in your post.
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • Ok, many thanks for help. Here is the output

      Brainfuck Source Code

      1. ​insgesamt 28692
      2. d-----S---+ 4 mysql mysql 4096 Mär 18 19:13 .
      3. drwxrwsr-x 5 extplorer users 4096 Mär 18 18:03 ..
      4. ---------- 1 mysql mysql 0 Mär 17 22:20 debian-5.5.flag
      5. ---------- 1 mysql mysql 18874368 Mär 17 22:22 ibdata1
      6. ---------- 1 mysql mysql 5242880 Mär 17 22:54 ib_logfile0
      7. ---------- 1 mysql mysql 5242880 Mär 17 20:03 ib_logfile1
      8. d-----S---+ 2 mysql mysql 4096 Mär 17 22:20 mysql
      9. ---------- 1 mysql mysql 6 Mär 17 20:04 mysql_upgrade_info
      10. d-----S---+ 2 mysql mysql 4096 Mär 17 22:20 performance_schema
    • Source Code

      1. drwxrws---+ 4 mysql users 4096 Mär 18 19:13 .
      2. drwxrwsr-x 5 extplorer users 4096 Mär 18 18:03 ..
      3. -rwxrwx---+ 1 mysql users 0 Mär 17 22:20 debian-5.5.flag
      4. -rwxrwx---+ 1 mysql users 18874368 Mär 17 22:22 ibdata1
      5. -rwxrwx---+ 1 mysql users 5242880 Mär 17 22:54 ib_logfile0
      6. -rwxrwx---+ 1 mysql users 5242880 Mär 17 20:03 ib_logfile1
      7. drwxrws---+ 2 mysql users 4096 Mär 17 22:20 mysql
      8. -rwxrwx---+ 1 mysql users 6 Mär 17 20:04 mysql_upgrade_info
      9. drwxrws---+ 2 mysql users 4096 Mär 17 22:20 performance_schema

      Tried the chown, found in your thread. Now it looks that way. MySQL Server seems to be running now, but I still got an error message, when I try to activate admin Website

      Tried the

      Source Code

      1. ​root@NAS:~# dpkg-reconfigure mysql-server-5.5
      2. Stopping MySQL database server: mysqld failed!
      3. invoke-rc.d: initscript mysql, action "stop" failed


      When I did

      Source Code

      1. ​root@NAS:~# mysql stop
      2. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

      The post was edited 1 time, last by emsic ().

    • My MYSQLDATA direcoty looks like this

      Source Code

      1. ​drwxr-sr-x 7 mysql mysql 4096 Mar 17 14:24 .
      2. drwxrwsr-x 31 root root 4096 Mar 17 23:35 ..
      3. -rw-r--r-- 1 mysql mysql 0 Mar 14 17:12 debian-5.5.flag
      4. -rw-rw---- 1 mysql mysql 60817408 Mar 18 18:37 ibdata1
      5. -rw-rw---- 1 mysql mysql 5242880 Mar 18 18:37 ib_logfile0
      6. -rw-rw---- 1 mysql mysql 5242880 Mar 18 18:22 ib_logfile1
      7. drwx--S--- 2 mysql mysql 12288 Mar 16 11:30 magento
      8. drwx--S--- 2 mysql mysql 12288 Mar 14 19:30 moodle
      9. drwx--S--- 2 mysql mysql 4096 Mar 14 17:36 myDB
      10. drwx--S--- 2 mysql mysql 4096 Mar 14 17:24 mysql
      11. -rw------- 1 root mysql 6 Mar 14 17:16 mysql_upgrade_info
      12. drwx--S--- 2 mysql mysql 4096 Mar 14 17:24 performance_schema
      Display All


      notice I don't have the + on the end of the . (current) directory, your folders have ACLs on them.
      Quick way to remove these is go to the directory above your mysql_data directory
      then run

      Source Code

      1. ​setfacl -b -R mysql_data
      where mysql_data is the name of your mysql_data directory
      the -b means remove all acls -R makes it run recursively (on all the directories/files)
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64
    • Source Code

      1. ​drwxrws--- 4 mysql users 4096 Mär 18 19:31 .
      2. drwxrwsr-x 5 extplorer users 4096 Mär 18 18:03 ..
      3. -rwxrwx--- 1 mysql users 0 Mär 17 22:20 debian-5.5.flag
      4. -rwxrwx--- 1 mysql users 18874368 Mär 17 22:22 ibdata1
      5. -rwxrwx--- 1 mysql users 5242880 Mär 18 19:31 ib_logfile0
      6. -rwxrwx--- 1 mysql users 5242880 Mär 17 20:03 ib_logfile1
      7. drwxrws--- 2 mysql users 4096 Mär 17 22:20 mysql
      8. -rwxrwx--- 1 mysql users 6 Mär 17 20:04 mysql_upgrade_info
      9. drwxrws--- 2 mysql users 4096 Mär 17 22:20 performance_schema


      OK so?
    • What is the directory that the mysql directory is in owned by extplorer?
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • you current (mysql_Data) directory . has
      ​drwxrws--- 4 mysql users 4096 Mär 18 19:31 .

      it should be
      ​drwxr-sr-x 7 mysql mysql 4096 Mar 17 14:24 .


      chmod 755 mysql_data (or whatever you called the data directory)
      chown mysql:mysql mysql_data
      Then try resetting the root password for mysql inside omv
      login to the admin with the new password and let me know if that works


      If not: your data directory (like /media/f0Blah-blah-etc-UUID) is currently owned by extplorer
      perhaps one of the mods can tell us if that is likely to be causing a problem with the plugin?

      When I had my problem, I had to set perms/owner correctly on the data drive (like /media/f0Blah-blah-etc-UUID)
      Create a clean non acl share with owner mysql and 775 permissions
      Follow eddies guide to remove mysql (including reboot)
      reinstall mysql from the web admin
      enable/set new share/bind address:0.0.0.0
      and then mysql worked fine...
      HP N40L microserver | OMV 1.19 (Kralizec) | OMV extras 1.34 | kernel 3.16.0-0.bpo.4-amd64