Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    27

    Question Unanswered: 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?

  2. #2
    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.

  3. #3
    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

  4. #4
    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?!

  5. #5
    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?

  6. #6
    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.

  7. #7
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    27
    With MySQL is it smart enough to have multiple instances run off one Windows Service?

  8. #8
    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.

  9. #9
    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 ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •