Re: Multiples instances of MySQL
Hi! Ok, the appropriate parameter mysqld --defaults-file=your_path_to_my_cnf already exists with which you can explicitly specify what my.cnf file mysqld reads in. Regards, Heikki Date: Sun, 30 Dec 2001 23:23:18 To: [EMAIL PROTECTED] From: Heikki Tuuri [EMAIL PROTECTED] Subject: Re: Multiples instances of MySQL Hi! You could try the following: make Windows batch files where you give all options to mysqld-max.exe on the command line: instance1.bat: mysqld-max --port=3306 --socket=... --datadir=... --basedir=... --innodb_data_home_dir=... --set-variable=innodb_buffer_pool_size=30M ... instance2.bat: mysqld-max --port=3307 --socket=... ... I hope we do not run over the command line length limit! But with the above you can get rid of my.ini and my.cnf altogether, or put just the shared starup parameters to my.cnf. Actually, Monty should add a startup option to mysqld: --read_this_my_cnf=a_path_to_my_cnf_file where you could tell from what location this instance of mysqld should read its startup parameters. I am forwarding this email to Monty too. He can consider adding the above startup option. Automatically searched my.cnf files cause constant confusion. Having an option to explicitly give the path would help in many situations. Regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB Hello Tony, Thank you for your note and assistance. However, I'm stuck on a particular point; I use Win2k Pro; struggling with 3rd option below, 'server-specific options', for multiple instances; MySQL does not see the \mysql\data\my.cnf options file, for some reason it only sees c:\winnt\my.ini and c:\my.cnf. Got this from the manual - 4.1.2; Filename Purpose windows-system-directory\my.ini Global options C:\my.cnfGlobal options C:\mysql\data\my.cnf Server-specic options MySQL tries to read option files in the order listed above. If multiple option files exist, an option specified in a file read later takes precedence over the same option specified in a file read earlier. Options specified on the command line take precedence over options specified in any option file. Some options can be specified using environment variables. Options specified on the command line or in option files take precedence over environment variable values. I cannot see where I'm going wrong; is this possibly a version 4.0.1 option. I'm using, 3.23.46-max. I also looked at 4.7.3, cannot figure out where and how to use mysqld# outside the my.cnf options file. Tony, could you please point me? Kind regards Emmanuel -- -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
Hello all, I'm in a spot, I'm managing to successfully run several instances of MySQL, say on port=3306 and port=3308. When I use shutdown, the instance which started first shuts down. To shutdown the instance started on port 3306, I use; mysqladmin -P 3306 -u root -p2000 shutdown And to shutdown the instance started on port 3308, I use; mysqladmin -P 3308 -u root -p2000 shutdown However, the instance which started first is always the instance which shuts down, irrespective of the port number I provide. Could someone please advise and/or point me. Thank you provisionally for any assistance. Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
On Mon, 2001-12-31 at 10:08, Emmanuel van der Meulen wrote: Hello all, I'm in a spot, I'm managing to successfully run several instances of MySQL, say on port=3306 and port=3308. When I use shutdown, the instance which started first shuts down. To shutdown the instance started on port 3306, I use; mysqladmin -P 3306 -u root -p2000 shutdown And to shutdown the instance started on port 3308, I use; mysqladmin -P 3308 -u root -p2000 shutdown However, the instance which started first is always the instance which shuts down, irrespective of the port number I provide. Try using the -S option to select the instance via the Unix domain socket rather than the port number (assuming this is a Unix installation). Could someone please advise and/or point me. Thank you provisionally for any assistance. Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
use --socket instead of -P would solve your problem. without -h, socket file is used for connection. since you've not specified the socket file, the default socket file path is used (in some case, /tmp/mysql.sock). that's why you're always shutting down the first one. Happy new year. On Mon, Dec 31, 2001 at 12:08:20PM +0200, Emmanuel van der Meulen wrote: Hello all, I'm in a spot, I'm managing to successfully run several instances of MySQL, say on port=3306 and port=3308. When I use shutdown, the instance which started first shuts down. To shutdown the instance started on port 3306, I use; mysqladmin -P 3306 -u root -p2000 shutdown And to shutdown the instance started on port 3308, I use; mysqladmin -P 3308 -u root -p2000 shutdown However, the instance which started first is always the instance which shuts down, irrespective of the port number I provide. Could someone please advise and/or point me. Thank you provisionally for any assistance. Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Sammy Lau mailto: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
Hello Sammy Martin, Thank you for your notes and assistance. ** Martin; Try using the -S option to select the instance via the Unix domain socket rather than the port number (assuming this is a Unix installation). ** Sammy; use --socket instead of -P would solve your problem. without -h, socket file is used for connection. since you've not specified the socket file, the default socket file path is used (in some case, /tmp/mysql.sock). that's why you're always shutting down the first one. As suggested, I used -S instead of -P, but still the first instance shuts down. I'm running on Win2K Pro. Is there a different way for Windows? Please advise any further pointers? Kind regards and all the best for 2002! Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
On Mon, 2001-12-31 at 10:50, Emmanuel van der Meulen wrote: As suggested, I used -S instead of -P, but still the first instance shuts down. I'm running on Win2K Pro. Is there a different way for Windows? Please advise any further pointers? Ok. Try to explicitly set the host on the command line: eg: mysqladmin -h 127.0.0.1 -P 2000 . Note that you should use the ip address of your host or its network name. Using 'localhost' won't do what you want. Kind regards and all the best for 2002! Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Multiples instances of MySQL
Hello Martin, [snip] Ok. Try to explicitly set the host on the command line: eg: mysqladmin -h 127.0.0.1 -P 2000 . Note that you should use the ip address of your host or its network name. Using 'localhost' won't do what you want. I include commands of two instances which I cannot shutdown correctly, the first instance running shuts down first no matter which shutdown command is activited. --- Instance1 - startup; mysqld-max --standalone --console -h 127.0.0.1 --port=3306 --socket=e:/docs/p3306.sock --pid-file=E:/Docs/DEPLOY/ org/funforlife/web/funsa/Db/p3306.pid --datadir=E:/Docs/DEPLOY/org/funforlif e/web/funsa/Db --basedir=d:/mysql --innodb_data_file_path=ibdata1:50M;ibdata 2:50M;ibdata3:50M;ibdata4:50M;ibdata5:50M --innodb_data_home_dir=E:/Docs/DEP LOY/org/funforlife/web/funsa/Db/innodb/ibdata --set-variable=innodb_mirrored _log_groups=1 --innodb_log_group_home_dir=E:/Docs/DEPLOY/org/funforlife/web/ funsa/Db/innodb/iblogs --set-variable=innodb_log_files_in_group=3 --set-vari able=innodb_log_file_size=30M --set-variable=innodb_log_buffer_size=30M --in nodb_flush_log_at_trx_commit=1 --innodb_log_arch_dir=E:/Docs/DEPLOY/org/funf orlife/web/funsa/Db/innodb/iblogs --innodb_log_archive=0 --set-variable=inno db_buffer_pool_size=70M --set-variable=innodb_additional_mem_pool_size=50M - -set-variable=innodb_file_io_threads=8 --set-variable=innodb_lock_wait_timeo ut=50 Instance1 - shutdown; mysqladmin -P 3306 -h 127.0.0.1 --socket=e:/docs/p3306.sock shutdown --- Instance2 - startup; mysqld-max --standalone --console -h 127.0.0.1 --port=3308 --socket=e:/docs/p3308.sock --pid-file=E:/Docs/DEPLOY/ com/lifecanbedifferent/web/mysql/Db/p3308.pid --datadir=E:/Docs/DEPLOY/com/l ifecanbedifferent/web/mysql/Db --basedir=d:/mysql --innodb_data_file_path=ib data1:20M --innodb_data_home_dir=E:/Docs/DEPLOY/com/lifecanbedifferent/web/m ysql/Db/innodb/ibdata --set-variable=innodb_mirrored_log_groups=1 --innodb_l og_group_home_dir=E:/Docs/DEPLOY/com/lifecanbedifferent/web/mysql/Db/innodb/ iblogs --set-variable=innodb_log_files_in_group=3 --set-variable=innodb_log_ file_size=20M --set-variable=innodb_log_buffer_size=20M --innodb_flush_log_a t_trx_commit=1 --innodb_log_arch_dir=E:/Docs/DEPLOY/com/lifecanbedifferent/w eb/mysql/Db/innodb/iblogs --innodb_log_archive=0 --set-variable=innodb_buffe r_pool_size=20M --set-variable=innodb_additional_mem_pool_size=10M --set-var iable=innodb_file_io_threads=8 --set-variable=innodb_lock_wait_timeout=50 Instance2 - shutdown; mysqladmin -P 3308 -h 127.0.0.1 --socket=e:/docs/p3308.sock shutdown --- Can you maybe see something causing the shutdown anomaly? Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Multiples instances of MySQL
On Mon, 2001-12-31 at 14:01, Emmanuel van der Meulen wrote: Hello Martin, [snip] Ok. Try to explicitly set the host on the command line: eg: mysqladmin -h 127.0.0.1 -P 2000 . Note that you should use the ip address of your host or its network name. Using 'localhost' won't do what you want. I include commands of two instances which I cannot shutdown correctly, the first instance running shuts down first no matter which shutdown command is activited. [snip] Instance2 - shutdown; mysqladmin -P 3308 -h 127.0.0.1 --socket=e:/docs/p3308.sock shutdown --- Can you maybe see something causing the shutdown anomaly? I have a Linux box hosting 2 MySQL servers on ports 3306 and 3307 (sockets mysql.sock and mysql1.sock). I can communicate to each using mysqladmin in this way: mysqladmin -h 127.0.0.1 -P 3307 variables | grep sock | socket| /var/run/mysqld/mysqld1.sock mysqladmin -h 127.0.0.1 -P 3306 variables | grep sock | socket| /var/run/mysqld/mysqld.sock Maybe you can try removing the --socket option ? This might be some special problem with the windows version. Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
See manual section 4.1.4. - Original Message - From: Emmanuel van der Meulen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 30, 2001 9:47 AM Subject: Multiples instances of MySQL Hello all, Could someone please advise, what is the procedure to start and run more than one instance of MySQL? Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
Hello Tony, Thank you for your note and assistance. However, I'm stuck on a particular point; I use Win2k Pro; struggling with 3rd option below, 'server-specific options', for multiple instances; MySQL does not see the \mysql\data\my.cnf options file, for some reason it only sees c:\winnt\my.ini and c:\my.cnf. Got this from the manual - 4.1.2; Filename Purpose windows-system-directory\my.ini Global options C:\my.cnfGlobal options C:\mysql\data\my.cnf Server-specic options MySQL tries to read option files in the order listed above. If multiple option files exist, an option specified in a file read later takes precedence over the same option specified in a file read earlier. Options specified on the command line take precedence over options specified in any option file. Some options can be specified using environment variables. Options specified on the command line or in option files take precedence over environment variable values. I cannot see where I'm going wrong; is this possibly a version 4.0.1 option. I'm using, 3.23.46-max. I also looked at 4.7.3, cannot figure out where and how to use mysqld# outside the my.cnf options file. Tony, could you please point me? Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
Hi! You could try the following: make Windows batch files where you give all options to mysqld-max.exe on the command line: instance1.bat: mysqld-max --port=3306 --socket=... --datadir=... --basedir=... --innodb_data_home_dir=... --set-variable=innodb_buffer_pool_size=30M ... instance2.bat: mysqld-max --port=3307 --socket=... ... I hope we do not run over the command line length limit! But with the above you can get rid of my.ini and my.cnf altogether, or put just the shared starup parameters to my.cnf. Actually, Monty should add a startup option to mysqld: --read_this_my_cnf=a_path_to_my_cnf_file where you could tell from what location this instance of mysqld should read its startup parameters. I am forwarding this email to Monty too. He can consider adding the above startup option. Automatically searched my.cnf files cause constant confusion. Having an option to explicitly give the path would help in many situations. Regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB Hello Tony, Thank you for your note and assistance. However, I'm stuck on a particular point; I use Win2k Pro; struggling with 3rd option below, 'server-specific options', for multiple instances; MySQL does not see the \mysql\data\my.cnf options file, for some reason it only sees c:\winnt\my.ini and c:\my.cnf. Got this from the manual - 4.1.2; Filename Purpose windows-system-directory\my.ini Global options C:\my.cnfGlobal options C:\mysql\data\my.cnf Server-specic options MySQL tries to read option files in the order listed above. If multiple option files exist, an option specified in a file read later takes precedence over the same option specified in a file read earlier. Options specified on the command line take precedence over options specified in any option file. Some options can be specified using environment variables. Options specified on the command line or in option files take precedence over environment variable values. I cannot see where I'm going wrong; is this possibly a version 4.0.1 option. I'm using, 3.23.46-max. I also looked at 4.7.3, cannot figure out where and how to use mysqld# outside the my.cnf options file. Tony, could you please point me? Kind regards Emmanuel --- - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Multiples instances of MySQL
Hello Heikki, Note, this is a duplicate posting - erroneously posted against 'General database questions'. Thank you very much for this note and your valued assistance. I have the different instances of MySQL running with your proposal to add the lot to a bat file. And yes, if such a option as you propose exists, others would possibly get multiple instances / my.cnf files working more easily. BTW, I wasn't aware that I could place the InnoDB options as options on the command line. They are not mentioned as command line options in chapter 4.1.1. So it was extremely helpful that you gave me that pointer. Either way thank you again for an excellent feature and also for your clear assistance. Kind regards Emmanuel - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php