Copyright (C) 2000-2012 |
GNU Info (mysql.info)Installing many serversInstalling Many Servers on the Same Machine ------------------------------------------- In some cases you may want to have many different `mysqld' daemons (servers) running on the same machine. You may for example want to run a new version of MySQL for testing together with an old version that is in production. Another case is when you want to give different users access to different `mysqld' servers that they manage themselves. One way to get a new server running is by starting it with a different socket and port as follows: shell> MYSQL_UNIX_PORT=/tmp/mysqld-new.sock shell> MYSQL_TCP_PORT=3307 shell> export MYSQL_UNIX_PORT MYSQL_TCP_PORT shell> scripts/mysql_install_db shell> bin/safe_mysqld & The environment variables appendix includes a list of other environment variables you can use to affect `mysqld'. Note: Environment variables. The above is the quick and dirty way that one commonly uses for testing. The nice thing with this is that all connections you do in the above shell will automatically be directed to the new running server! If you need to do this more permanently, you should create an option file for each server. Note: Option files. In your startup script that is executed at boot time (mysql.server?) you should specify for both servers: `safe_mysqld --default-file=path-to-option-file' At least the following options should be different per server: `port=#' `socket=path' `pid-file=path' The following options should be different, if they are used: `log=path' `log-bin=path' `log-update=path' `log-isam=path' `bdb-logdir=path' If you want more performance, you can also specify the following differently: `tmpdir=path' `bdb-tmpdir=path' Note: Command-line options. If you are installing binary MySQL versions (.tar files) and start them with `./bin/safe_mysqld' then in most cases the only option you need to add/change is the `socket' and `port' argument to `safe_mysqld'.
automatically generated by info2www version 1.2.2.9 |