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!

Installing MySQL Twice

Status
Not open for further replies.
Aug 27, 2001
502
0
0
US
I posted a message yesterday asking how I could install a database on a separate volume than the default. Here's the thread. It explains why I need to do this:
Another possible solution to my problem would be to install a second instance of MySQL on the new partition. But I would need to run both instances at the same time on the same OS. Is this even possible?

Is there a better way to accomplish this task than what I have proposed in these two threads?

“If you are irritated by every rub, how will you be polished?” ~ Mevlana Rumi


Do you live in Michigan? Join us in the Tek-Tips in Michigan forum.
 
How about this...

I don't use Cent OS, so I'm making the following assumptions;
1. the datadir in /etc/mysql/my.cnf is /var/lib/mysql.
2. MySQL is run as the user "mysql"

As root...
1. /etc/init.d/mysql stop
2. mkdir /var/lib/mysql/new_database
3. mount the new (formatted) volume over /var/lib/mysql/new_database
4. chown -R mysql:mysql /var/lib/mysql/new_database
5./etc/init.d/mysql start
6. start building the new database

Just replace new_database with whatever you want to call it.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top