Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with default configurations

Status
Not open for further replies.

JCFISH

Technical User
Mar 6, 2009
2
0
0
US
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.
 
Unfortunately, we are using Veritas Cluster Server on these boxes.

Having said that...

It looks like I have most everything working the way I want, but I still have a few issues...

I modified a copy of the mysqld_safe script, and a copy of the my.cnf file, and the startup command appears to be running without any issues.

When I do a "ps -ef", I see the processes running as I expect them to.

However, when I attempt to run the "mysql -p" command to login to the DB, it throws the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

This is not the socket that I want to use, nor is it the one that shows up when I do a ps -ef.,.

Now having said that... If I execute the "mysql -p" command, and include the correct "--socket=" option, it allows me to login...

But, when I attempt to execute the "use <DB>" command, I get the following error:

ERROR 1049 (42000): Unknown database 'XXXX_Metrics'.

I'm getting closer, but I'd be very grateful if someone could tell me where the configuration of the socket and the <DB> definition are done...

TIA

Joe F...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top