If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Setting up multiple instances of MySQL databases (was "The Best Method?")

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-03-05, 12:02
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
Question Setting up multiple instances of MySQL databases (was "The Best Method?")

This thread may be similar to my last one, however upon looking back at my old thread, I cannot seem to see the responses. Either way, here is what I am trying to do.

Scenario: Setting up multiple instances of MySQL databases on the same server. I've never done this with MySQL.

In doing my research is this the same as running multiple MySQL Servers on the same machine? The reason that I ask is that in the MySQL Ref Manual it seems to make reference to this where I would be running the 'mysqld_multi' to manage all instances. Is this true? And if so, it seems as though setting up multiple instances is somewhat convuluted. Any help or advice would be GREATLY appreciated

What is the best method for setting up multiple instances on a MySQL server?
Reply With Quote
  #2 (permalink)  
Old 10-03-05, 14:02
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
With setting up multiple instances on a 4.1 Server, I have tried just modifying the my.cnf to include say 5 variations of the values that appear under [mysqld] and it does not seem to work. It would be great if there was a tool that would allow you to setup multiple instances on a server, rather than just one.
Reply With Quote
  #3 (permalink)  
Old 10-03-05, 15:15
felixg felixg is offline
Registered User
 
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
Quote:
Originally Posted by Splitfyre
With setting up multiple instances on a 4.1 Server, I have tried just modifying the my.cnf to include say 5 variations of the values that appear under [mysqld] and it does not seem to work.
Here's how I have it working:

1) create as many my.cnf's as necessary, e.g. my-1.cnf, my-2.cnf etc...
Make sure they all have different data directories, sockets and port numbers, etc...

2) start them with

bin/mysqld_safe --defaults-file=/path/to/my-1.cnf --user=mysql &
bin/mysqld_safe --defaults-file=/path/to/my-2.cnf --user=mysql &
etc...

--
felix
Reply With Quote
  #4 (permalink)  
Old 10-06-05, 12:37
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
Exclamation

This then begs the question, how many ports can one specify as the installer for MySQL only shows ports: 3306 to 3309?!
Reply With Quote
  #5 (permalink)  
Old 10-06-05, 12:59
felixg felixg is offline
Registered User
 
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
Quote:
Originally Posted by Splitfyre
This then begs the question, how many ports can one specify as the installer for MySQL only shows ports: 3306 to 3309?!
As many as you want? I edit the ini-files with vi. What platform are you on?
Reply With Quote
  #6 (permalink)  
Old 10-06-05, 13:22
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
I am setting this up on Windows 2000 Server. This is a test server, so I am just trying to figure out how to create instances. Currently I've created 10 my-#.ini files and each has a different port and data directory. I couldn't find where I could change the socket name for each instance.
Reply With Quote
  #7 (permalink)  
Old 10-06-05, 13:56
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
With MySQL is it smart enough to have multiple instances run off one Windows Service?
Reply With Quote
  #8 (permalink)  
Old 10-06-05, 14:48
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
Unhappy Multiple Instances - 1067 Error

Currently I have MySQL Server 5.0 installed on a Windows 2000 Server. There are 10 my-# ini files as I need 10 instances of MySQL. I've created one MySQL service for each instance, however upon either:

a) running net start MySQL#
or
b) starting the MySQL# service from Administrative Tools - Services

In both cases it seems as though only 2 instances will start, and then I'll get a 1067 error. I then read through the online documentation for this 1067 error and I cannot seem to move forward.
Reply With Quote
  #9 (permalink)  
Old 10-06-05, 15:03
felixg felixg is offline
Registered User
 
Join Date: Apr 2005
Location: Lier, Belgium
Posts: 122
Quote:
Originally Posted by Splitfyre
In both cases it seems as though only 2 instances will start, and then I'll get a 1067 error. I then read through the online documentation for this 1067 error and I cannot seem to move forward.
I have no experience with this on Windows, but have you read http://dev.mysql.com/doc/mysql/en/mu...-services.html ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On