1 message in com.mysql.lists.mysqlRe: Databases in a different location...
FromSent OnAttachments
Nuno Pereira26 Jul 2005 09:41 
Subject:Re: Databases in a different location than the default
From:Nuno Pereira (nuno@carclasse.pt)
Date:07/26/2005 09:41:30 AM
List:com.mysql.lists.mysql

Tim Holmes wrote:

Hello.

You could find the clues in the error log. See:

http://dev.mysql.com/doc/mysql/en/error-log.html

Good Afternoon:

I have rebuilt by web / database server from bare metal this morning. The computer is running Fedora Core 3, and is fully patched and up to date. The MySQL version is 4.1.12-1, and I have installed the following components - Server - Client - Compat-libs

All were installed from the RPMs provided by MySQL.com To start of, I am fairly new to administering database servers, and

to

using them, so if my question seems a little elementary, please understand and answer accordingly. My question is this. My databases are located on a different physical machine from the one running the database server - (for backup etc reasons) The databases reside in /home/mysql - that's an NFS share, which I

know

for a fact is valid, as I have other data being used from the share the default my.cnf is listed here:

[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock

[mysql.server] user=mysql basedir=/var/lib

[safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid

When I start the mysql server with this configuration, it appears to start in good order. It is my understanding that in order to have the server utilize my databases that are on the other machine, I need to change the datadir directive in the my.cnf file to read datadir=/home/mysql when I do this however, mysql fails to start - it waits for a period

of

time and gives me a failed error. Can someone please explain to me what is going wrong, and what I can

do

to fix it. - I am not interested in having someone fix this for me, I just need some guidance so that I can learn how to fix it myself, so when it happens again, I will know what to do.

[Tim Holmes] Gleb, et. al.

As you suggested, I have checked out the log files and this is what I have found:

050713 11:00:09 mysqld started 050713 11:00:09 [Warning] Asked for 196608 thread stack, but got 126976 050713 11:00:09 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 050713 11:00:09 [ERROR] Do you already have another mysqld server running on port: 3306 ? 050713 11:00:09 [ERROR] Aborting

050713 11:00:09 [Note] /usr/sbin/mysqld: Shutdown complete

050713 11:00:09 mysqld ended

This suggests to me a communications problem on either the database server, or the file server where the databases reside.

I guess the next question is how do I check to see whats going on here.

The error says that you tried to start another server, listening in the same (default) port 3306, which is not possible. Try to start in a different port (like 33306, or 3307). How do you start mysql? A suggest create a different start script for the other databases (/home/mysql), that uses a different my.conf, where you have the other parameters on the database

I tried telnet 192.168.0.5:3306 and got the following

[root@srvweb-01 log]# telnet 192.168.0.5:3306 192.168.0.5:3306/telnet: Name or service not known

This may suggest that telnet is not installed, or it may indicate another problem

You used the wrong syntax, you should have tried

# telnet 192.168.0.5 3306

(With a space instead of a semicolon) It should prompt you with some imperceptible data, where you can see the version of MySQL Server in the middle. Close it with Ctrl+D

Any suggestions are welcome

TIM