GREAT!!! thanks to all, especially to "ryecoaaron". his instructions also work in OMV 3.x MySQL 3.x (I used to install seafile 6.x server with the tutorial of "baldman") ...(link: How to install Seafile with MySQL and SSL).
[SOLVED] Change MySQL database location OpenMediaVault 2.1
-
- OMV 2.x
- gelöst
- Lord Wektabyte
-
-
Yep, very easy. Decide where you want it - ie /media/long_uuid/mysql
Stop the service - service mysql stop
Make the directory - mkdir -p /media/long_uuid/mysql
Change the owner - chown mysql:mysql /media/long_uuid/mysql
Then copy all files to that location - cp -rfvp /var/lib/mysql/* /media/long_uuid/mysql/Add datadir = /media/long_uuid/mysql to the extra options box in the plugin. Save and apply.
That's it.
Will these steps work OK without making any alterations to the 'data directory' dropdown in the plugin? In other words, does the text added to the 'extra options' box override the contents of that dropdown?
Thank you!
-
Will these steps work OK without making any alterations to the 'data directory' dropdown in the plugin? In other words, does the text added to the 'extra options' box override the contents of that dropdown?
No. This is only works with the version of the plugin that does not have the data directory dropdown which is the OMV 3.x version.
-
-
Thanks. Is it possible/sensible to move the mySQL folder, then? (I went to Shared Folders and tried to alter the location of the MySQL folder there but it said this would not move the files and I would need to do that myself, at which point I decided not to mess around yet...) I have recently repartitioned the (120GB) SSD that previously was only the system drive and contained a lot of wasted space. Ideally I would like the mySQL databases on that drive, but I'm being a bit circumspect because I suspect that doing this wrong will break things....
-
If you are on the OMV 2.x version, you should be able to just change the shared folder it is using in the plugin. It will move the files.
-
Thank you - I can no longer get in via the SQL management panel - is that as expected?
-
-
I can no longer get in via the SQL management panel - is that as expected?
Obviously not. Did you reboot? Is MySQL running? Look in the Services tab to see what color the indicator is.
-
I've rebooted now; MySQL is running and Greyhole appears to be behaving itself as well - both the indicators are green.
Still getting the error as per screenshot when I try and log in via MySQL management site.
Current load average is extremely high, though, as per second shot - not sure whether that's related.
-
What does your mysql settings page look like?
-
-
Here you go - looks as it did before to me...
-
Seems like the files did not copy/move. Did you look in the new shared folder to see if files were there?
-
Yes, they appear to have copied over - checked that already.
-
-
Is the ownership correct? Is there anything in the mysql log files in /var/log/?
-
Ownership of the files and folders in the new location appears to be correct: owner/group are listed as mysql/mysql.
The mysql.log file is blank - nothing in it.
-
Is the directory listed in /etc/mysql/conf.d/openmediavault-mysql.cnf correct?
-
-
Yes, that's pointing to the right location.
-
Maybe the web server config needs to be rewritten??
omv-mkconf nginx
omv-mkconf php5fpm
service nginx restart
service php5-fpm restartAnd maybe clear your browser cache??
-
Nice one - that solved it. Thank you.
-
-
good to hear!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!