We originally installed a MySQL instance on two separate RedHat servers, using all of the default settings, to include datadir, socket, log-error, pid-file, etc.
We recently decided to cluster these servers, but the two database instances cannot co-exist on the same server at the same time, because they're both using the same port numbers, same log directories, etc.
I need to modify at least one of these configurations, so that it logs to a different directory structure, accesses the database instance via a different port, and where the database itself resides under a different directory structure.
Can anyone tell me which files need to be modified, and in which directories they exist?
I already created a copy of the mysqld startup script, and modified the entries in it.
NOTE: I was not able to modify the environment variables in this startup script, but I was able to hard code each of the directory references in the mysqld_safe startup command.
Everything seems to startup just fine, as long as I don't change the socket location.
But, even though the mysqld command appears to work, and it can be seen using a ps -ef, I can not connect to the actual database.
I keep getting the following error message:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
/var/lib/mysql/mysql.sock does exist!
Does anyone know how to modify the startup script(s), or configuration files, to move the database instance to the new port?
Thanks in advance, and have a great day.
Joe F.
We recently decided to cluster these servers, but the two database instances cannot co-exist on the same server at the same time, because they're both using the same port numbers, same log directories, etc.
I need to modify at least one of these configurations, so that it logs to a different directory structure, accesses the database instance via a different port, and where the database itself resides under a different directory structure.
Can anyone tell me which files need to be modified, and in which directories they exist?
I already created a copy of the mysqld startup script, and modified the entries in it.
NOTE: I was not able to modify the environment variables in this startup script, but I was able to hard code each of the directory references in the mysqld_safe startup command.
Everything seems to startup just fine, as long as I don't change the socket location.
But, even though the mysqld command appears to work, and it can be seen using a ps -ef, I can not connect to the actual database.
I keep getting the following error message:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
/var/lib/mysql/mysql.sock does exist!
Does anyone know how to modify the startup script(s), or configuration files, to move the database instance to the new port?
Thanks in advance, and have a great day.
Joe F.