Also MySQL Problem with OMV 1.x

  • 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 4.x // Hardware: HP N36L Microserver (BIOS mod), 4GB RAM, 2x1TB WD Red + 2x2TB ST, 160GB for OMV

    OMV 5.x // Hardware: HP Microserver Gen8, 4GB RAM, 2x4TB WD + 2x2TB ST, 160GB for OMV

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

    Code
    service mysql start


    it should fail


    try to remove it

    Code
    apt-get --purge remove mysql-server


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


    removing this dir

    Code
    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

    Code
    dpkg -l | grep mysql


    removing all listed packages

    Code
    apt-get --purge remove php5-mysqlnd


    .
    .
    .
    .
    etc.


    check your job

    Code
    dpkg -l | grep mysql


    another check

    Code
    dpkg --get-selections | grep mysql


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

    Code
    apt-get --purge remove [name of the package]


    now clean apt-get cache

    Code
    apt-get autoremove
    apt-get clean


    again removing this dir

    Code
    rm /etc/mysql/ -R


    and this

    Code
    rm /var/lib/mysql/ -r


    now check if everything is done

    Code
    ps -ax


    !!!REBOOT!!!


    and after Login in the Webinterface install MySQL-plugin
    Done!

  • I have had issues with the mysql management site losing login credentials. If I forget to logout of the site and close the window then I can never login again. I have to strip everything out and start over.

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


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



    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


    I am short before to give up, as I believe inbetween OMV is only for Professionals :(

    • Offizieller Beitrag

    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 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 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!

    Zitat

    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?

    • Offizieller Beitrag

    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 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!

  • Can you go into the newly created shared directory and run ls -la to show the permissions on the new clean share.
    I ask because I had trouble with mysql plugin that turned out to be permissions based (on the root of the data drive)


    See here

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

  • Zitat

    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.


    Zitat

    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 ;)

  • 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

    Code
    cd /media/f0*


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

    Code
    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

    Code
    insgesamt 28692
    d-----S---+ 4 mysql     mysql     4096 Mär 18 19:13 .
    drwxrwsr-x  5 extplorer users     4096 Mär 18 18:03 ..
    ----------  1 mysql     mysql        0 Mär 17 22:20 debian-5.5.flag
    ----------  1 mysql     mysql 18874368 Mär 17 22:22 ibdata1
    ----------  1 mysql     mysql  5242880 Mär 17 22:54 ib_logfile0
    ----------  1 mysql     mysql  5242880 Mär 17 20:03 ib_logfile1
    d-----S---+ 2 mysql     mysql     4096 Mär 17 22:20 mysql
    ----------  1 mysql     mysql        6 Mär 17 20:04 mysql_upgrade_info
    d-----S---+ 2 mysql     mysql     4096 Mär 17 22:20 performance_schema
  • Code
    drwxrws---+ 4 mysql     users     4096 Mär 18 19:13 .
    drwxrwsr-x  5 extplorer users     4096 Mär 18 18:03 ..
    -rwxrwx---+ 1 mysql     users        0 Mär 17 22:20 debian-5.5.flag
    -rwxrwx---+ 1 mysql     users 18874368 Mär 17 22:22 ibdata1
    -rwxrwx---+ 1 mysql     users  5242880 Mär 17 22:54 ib_logfile0
    -rwxrwx---+ 1 mysql     users  5242880 Mär 17 20:03 ib_logfile1
    drwxrws---+ 2 mysql     users     4096 Mär 17 22:20 mysql
    -rwxrwx---+ 1 mysql     users        6 Mär 17 20:04 mysql_upgrade_info
    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

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


    When I did

    Code
    root@NAS:~# mysql stop
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  • My MYSQLDATA direcoty looks like this


    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

    Code
    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

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


    OK so?

    • Offizieller Beitrag

    What is the directory that the mysql directory is in owned by extplorer?

    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!

  • you current (mysql_Data) directory . has

    Zitat

    drwxrws--- 4 mysql users 4096 Mär 18 19:31 .


    it should be

    Zitat

    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

Jetzt mitmachen!

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