I'm new to MySQL so hopefully this all makes sense.
I'm running mysql-3.23.58-14 on Fedora Core 3 and everything installs
and comes up correctly using default locations for everything.
However, I installed an 800GB RAID5 array in the server and created a
new file system on it and I attempted to move the datadir location to
the new file system and that's when the problems started.
Basically what I did was this - I shut down mysqld and copied
everything from /var/lib/mysql over to my new filesystem (/data/mysql).
Then I checked the owner of /data/mysql and all subdirectories - its
mysql:mysql just like the original location. I checked to make sure
the permissions were the same as the original location and they are.
Then I edited /etc/my.cnf and changed the line datadir=/data/mysql. I
left everything else in the file as it was. Then I tried to start
mysqld again and got the following message:
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
I checked /var/log/mysqld.log and found:
050331 00:43:17 mysqld started
/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)
050331 0:43:17 Aborting
050331 0:43:17 /usr/libexec/mysqld: Shutdown Complete
050331 00:43:17 mysqld ended
I googled the errorcode and found its permission related but I've
double-checked and triple-checked the owner, group and file permissions
on the alternate datadir location and they look like they're
correct...so I'm unsure on how to proceed from here.
If I switch the datadir back to its original location in /etc/my.cnf
everything starts up fine.
Any help you can offer would be greatly appreciated.
Travis