[opensuse] MySQL doesn't seem to like NAS
Thanks to the advice I received in this forum, I have succesfully edited fstab so that my NAS is properly mounted when my Linux boxes reboot. I have tested this by creating simple text files and saving them to directories on the NAS. I then used MySQL Workbench to tell MySQL to put all it's data on the NAS, and when I check my.cnf, that worked as expected. However, from that point onward, MySQL has refused to start. What I get is an error message saying only that it failed to start, but nothing to indicate why or how to fix it. I asked about this on the Google mysql newsgroup, but I now see that traffice there is so low, I may not live long enough to see a response. Thus, I am hoping that there are enough MySQL users here who know well how to administer MySQL on Suse 12.3 and who can tell me a) how to fix this and b) what the correct procedure is to have MySQL store all it's data on my NAS (and whether or not the same procedure would work on Ubuntu). I'd remind those who respond, I am a programmer and know almost nothing about administering Linux boxes (I am still learning the basics of Linux system administration it seems). Thanks Ted -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ted Byers wrote:
Thanks to the advice I received in this forum, I have succesfully edited fstab so that my NAS is properly mounted when my Linux boxes reboot. I have tested this by creating simple text files and saving them to directories on the NAS.
I then used MySQL Workbench to tell MySQL to put all it's data on the NAS, and when I check my.cnf, that worked as expected. However, from that point onward, MySQL has refused to start. What I get is an error message saying only that it failed to start, but nothing to indicate why or how to fix it.
Then you need to look for some diagnostics. Start with: /var/log/messages, /var/log/mysqld/.
Thus, I am hoping that there are enough MySQL users here who know well how to administer MySQL on Suse 12.3 and who can tell me a) how to fix this
We need to know what "this" is :-) "mysql doesn't start" simply isn't enough to go on.
and b) what the correct procedure is to have MySQL store all it's data on my NAS (and whether or not the same procedure would work on Ubuntu).
Mount your filesystem <somewhere>, then change my.cnf:[mysqld]:datadir accordingly. -- Per Jessen, Zürich (12.0°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Thanks. I did, finally figure out how to restore it back to the default condifuration Looking at the tail of the messages helped. As it turned out, MySQL Workbench changed the my.cnf file but didn't move any files or rectories. Thus, when MySQL tried to start, it couldn't find its files. and so it died. Now there are some questions that arise. 1) How do I verify that the NAS is mounted at boot time before the system tries to star MySQL? 2) How do I verify that MySQL has read/write permissions on the NAS mount? (I know my account and root both have access but I do not know if MySQL runs are either of users - but, indeed, I'd be a bit nervous if MySQL ran as root). 3) What is the preferred way to tell MySQL that it should store the data for a given schema on a specific directory on the NAS? Thanks Ted -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ted Byers wrote:
Now there are some questions that arise.
1) How do I verify that the NAS is mounted at boot time before the system tries to star MySQL?
You amend /etc/fstab with an entry for your NAS filesystem. Find your device/partition in /dev/disk/by-id/, then add that to /etc/fstab along with the mountpoint. Yast2:partitioner will also help you with this.
2) How do I verify that MySQL has read/write permissions on the NAS mount? (I know my account and root both have access but I do not know if MySQL runs are either of users - but, indeed, I'd be a bit nervous if MySQL ran as root).
mysql runs as mysql - your datadir needs to be owned by mysql:mysql.
3) What is the preferred way to tell MySQL that it should store the data for a given schema on a specific directory on the NAS?
I think you'll need mysql tablespaces for that: http://dev.mysql.com/doc/refman/5.5/en/innodb-multiple-tablespaces.html -- Per Jessen, Zürich (11.8°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 09/11/2013 10:34 PM, Ted Byers wrote:
I'd remind those who respond, I am a programmer and know almost nothing about administering Linux boxes (I am still learning the basics of Linux system administration it seems).
Note that unless you have a very fast network plus an equally competent network filesystem and/or protocol, placing mysql databases there is really bad idea unless you know exactly what are you doing. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Cristian Rodríguez
-
Per Jessen
-
Ted Byers