mysql on secondary drive
I'm trying to set up a new server with mysql on the secondary drive. I've done this with several servers before, but it's not working with this one. Once I point to the new drive, mysql won't start. I'm wondering if mysql 4 has something to do with it, because that's the only difference I can find. The error message made me think it was a permissions problem, but the permissions and ownership match my other servers so I don't know what's wrong.Here's what I've tried...
In /etc/my.conf, I set the datadir to /home2/mysql. I leave the sock file in /var/lib/mysql -- When I stop/start mysql to test the new configuration, I get this error message:
Failed to start database :
Initializing MySQL database: Installing all prepared tables
050415 19:26:02 [Warning] Can't create test file /home2/mysql/adz.lower-test
/usr/libexec/mysqld: Can't change dir to '/home2/mysql/' (Errcode: 13)
050415 19:26:02 [ERROR] Aborting
050415 19:26:02 [Note] /usr/libexec/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /home2/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /home2/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
[FAILED]
Initializing MySQL database: Installing all prepared tables
050415 19:26:02 [Warning] Can't create test file /home2/mysql/adz.lower-test
/usr/libexec/mysqld: Can't change dir to '/home2/mysql/' (Errcode: 13)
050415 19:26:02 [ERROR] Aborting
050415 19:26:02 [Note] /usr/libexec/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /home2/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /home2/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
[FAILED]
I also tried a symlink from /var/lib/mysql --> /home2/mysql, but mysql fails to start after I do this. I've never been successful in using the symlink method. On all my other servers, I use my.conf to specify the data directory.
If you have any ideas, I would appreciate it.
