I have a HP-UX server with two instances of Mysql.
The first one was the original and was located in
/mysql
, and keeps its database files in/mysql/data/
The second one I have installed by mistake and is located in
/usr/local/mysql
, and it keeps its database files in/usr/local/mysql/data/
Now the problem is (i guess because of the new installation), when i issue the command to start the mysql daemon (the original one located in /mysql
) i receive the following message:
... so as you can see I start the daemon from the old instance of mysql but when it starts it is now using the new installation database files.
How can i change the path (what file i should edit) in order to make the daemon to point to the old database files that are located in /mysql/data/
?
this should answer your question. it describes how mysql reads configuration files. It looks like you will need two users for mysql to run two instances from two different locations.
You can pass an option to mysqld here is the link http://docs.oracle.com/cd/E17952_01/refman-5.5-en/mysqld-safe.html
so, just start mysqd-safe script with --datadir=your_path option :