Re: mysqld_multi
Am 01.06.2017 um 00:01 schrieb Matthew Black: I DON'T RUN SYSTEMD, so that's not an option. At all. Why is that so hard to grasp? then just clone the sysvinit script as i have done years ago before syetemd on dozens of machines without ever touch mysqld_multi - why is that so hard to grasp? Where do I enter the command "create table database" when mysqld isn't running? It isn't possible to launch mysqld when there's no database directory or initialized database. *that* was missing from the very begin but still RTFM https://dev.mysql.com/doc/refman/5.7/en/mysql-install-db.html in my google search field is nothing more than "mysql init database" and guess what - when you have *somewhere* a running instance you can just shut it down, rsync the "mysql" folder from the datadir to the new instance and just fire it up - that's how i clone and init mysqld instances since 15 years, i explained that already You fail to grasp my problem and your answers are completely unhelpful you fail to describe your problem properly they don't behave anything different if you have a single server Really? With mysqld_multi, each mysqld daemon listens on a separate port. Each database instance gets its own environment that database administrators control WITHOUT INTERFERING with other database instances. In single-server environment, the server listens only on port 3306 and all databases run on that one port; it is not possible to shutdown individual databases, only ALL databases. tell me something new - but there is no difference how you connect to a databaseserver - just host/port or host/socket - so what -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: mysqld_multi
I DON'T RUN SYSTEMD, so that's not an option. At all. Why is that so hard to grasp? Where do I enter the command "create table database" when mysqld isn't running? It isn't possible to launch mysqld when there's no database directory or initialized database. You fail to grasp my problem and your answers are completely unhelpful. I did not ask for "help" commands or links to the 5200-page reference manual, as those did not supply the options required to solve MY PROBLEM. This is a community forum where members are free to post questions. Several people pointed me toward the right direction but their answers were incomplete. It was ultimately Oracle support that answered my question, for which I am most appreciative. > they don't behave anything different if you have a single server Really? With mysqld_multi, each mysqld daemon listens on a separate port. Each database instance gets its own environment that database administrators control WITHOUT INTERFERING with other database instances. In single-server environment, the server listens only on port 3306 and all databases run on that one port; it is not possible to shutdown individual databases, only ALL databases. matthew -Original Message- From: Reindl Harald [mailto:h.rei...@thelounge.net] Sent: Wednesday, May 31, 2017 9:28 AM To: mysql@lists.mysql.com Subject: Re: mysqld_multi Am 31.05.2017 um 17:48 schrieb Matthew Black: > # mysql -uroot -p --socket=/MySQLdb/cba/mysql.sock > mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; > mysql> quit > > I was simply seeking those three commands, but the reference manual did not > provide a real-world example. they don't behave anything different if you have a single server, mysqld_multi or just a dozen mysqld instances started directly with systemd and "Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311" still is nosense besides a basic command like "create table database" where your problem was obviosuly connect to the instance at all in my first response you got: [harry@srv-rhsoft:~]$ mysql --help | grep port well, find the socket option is similar [harry@rh:~]$ mysql --help | grep socket -S, --socket=name The socket file to use for connection. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
Am 31.05.2017 um 17:48 schrieb Matthew Black: # mysql -uroot -p --socket=/MySQLdb/cba/mysql.sock mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; mysql> quit I was simply seeking those three commands, but the reference manual did not provide a real-world example. they don't behave anything different if you have a single server, mysqld_multi or just a dozen mysqld instances started directly with systemd and "Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311" still is nosense besides a basic command like "create table database" where your problem was obviosuly connect to the instance at all in my first response you got: [harry@srv-rhsoft:~]$ mysql --help | grep port well, find the socket option is similar [harry@rh:~]$ mysql --help | grep socket -S, --socket=name The socket file to use for connection. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: mysqld_multi
Thank you all for the tips. I've read the manual multiple times and it is NOT clear what options are necessary in a multi environment. The missing element was provided by Oracle support: I need to use --defaults-file=my.cnf as in: # mysqld --defaults-file=cba.cnf --initialize --user=cba CBA.CNF contents: [mysqld]# No instance number, NOT documented! socket = /MySQLdb/cba/mysql.sock port = 3317 pid-file = /MySQLdb/cba/mysqld.pid datadir= /MySQLdb/cba lc-messages-dir = /usr/share/mysql/English log-error = /MySQLdb/cba/mysql.error user = cba # mysql -uroot -p --socket=/MySQLdb/cba/mysql.sock mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; mysql> quit I was simply seeking those three commands, but the reference manual did not provide a real-world example. matthew -Original Message- From: shawn l.green [mailto:shawn.l.gr...@oracle.com] Sent: Saturday, May 20, 2017 10:57 AM To: mysql@lists.mysql.com Subject: Re: mysqld_multi Hello Matthew, On 5/19/2017 12:19 PM, Matthew Black wrote: > I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging > 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, > each database on its own TCP Port 33xx. I'm having trouble creating a > database on the new server in a multi environment. > > > > Can anyone provide a simple example of how to edit /etc/my.cnf file and > command line steps necessary for creating a new database running on, for > example, port 3311? > > > > Thanks in advance. > > > > matthew > How to use mysql_multi is covered in the Manual. This includes a sample my.cnf file demonstrating how to define your separate instances. https://dev.mysql.com/doc/refman/5.7/en/mysqld-multi.html However, before you setup an instance to be managed by mysqld_multi, you will need to instantiate a set of datafiles for that 5.7 instance of the mysqld daemon to manage. You do that following the directions here (by hand) the first time. https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html This means you need to setup at least two folders (one for --datadir and one for --tmpdir) for each separate instance you want to create and assign ownership and privileges to those folders appropriate to the user your mysqld daemon will be executing as when it runs. There are other things you must also keep unique between instances when they share a common host machine. Those are described here: https://dev.mysql.com/doc/refman/5.7/en/multiple-servers.html An example of setting up the folders and assigning privileges to them is located in the instructions to installing a set of mysqld binaries using a .zip or .tar archive. Please note, you do not need a separate mysqld installation for each instance you want to create. Several daemons (each operating on their own port, socket, folders, data files,... ) can be started using just one set of binary files. https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html So... the general process would look like this (presuming you have already installed mysqld and setup at least one instance) == 1) Decide where you want a second (or later) instance to store its files. Choose port numbers and unix socket names for this new instance that are unique from any other instances that will be running on this host. 2) Setup any new folders you need to create (including assigning privileges) 3) Document those names and any other settings you want this additional instance to use in a configuration file specific for this instance 4) Use that special configuration file to bootstrap (initialize) the data files used to manage that instance (the --initialize instructions were linked to earlier in this reply) 5) Once you have this instance setup the way you want. Shut it down. 6) Copy the elements that are unique to this instance into an appropriately-named section of your common configuration file (the one that mysqld_multi will read) 7) Test that you can start/stop this new instance using mysqld_multi As you can tell, it takes a bit of planning and effort to establish a non-default setup of hosting multiple MySQL instances on the same host machine. There is no simple one-line command to tell mysqld_multi to create a new instance as there are things it cannot do (like create folders in your file system). Regards, -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Integrated Cloud Applications & Platform Services Office: Blountville, TN Become certified in MySQL! Visit https://www.mysql.com/certification/ for details. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
Hello Matthew, On 5/19/2017 12:19 PM, Matthew Black wrote: I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, each database on its own TCP Port 33xx. I'm having trouble creating a database on the new server in a multi environment. Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311? Thanks in advance. matthew How to use mysql_multi is covered in the Manual. This includes a sample my.cnf file demonstrating how to define your separate instances. https://dev.mysql.com/doc/refman/5.7/en/mysqld-multi.html However, before you setup an instance to be managed by mysqld_multi, you will need to instantiate a set of datafiles for that 5.7 instance of the mysqld daemon to manage. You do that following the directions here (by hand) the first time. https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html This means you need to setup at least two folders (one for --datadir and one for --tmpdir) for each separate instance you want to create and assign ownership and privileges to those folders appropriate to the user your mysqld daemon will be executing as when it runs. There are other things you must also keep unique between instances when they share a common host machine. Those are described here: https://dev.mysql.com/doc/refman/5.7/en/multiple-servers.html An example of setting up the folders and assigning privileges to them is located in the instructions to installing a set of mysqld binaries using a .zip or .tar archive. Please note, you do not need a separate mysqld installation for each instance you want to create. Several daemons (each operating on their own port, socket, folders, data files,... ) can be started using just one set of binary files. https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html So... the general process would look like this (presuming you have already installed mysqld and setup at least one instance) == 1) Decide where you want a second (or later) instance to store its files. Choose port numbers and unix socket names for this new instance that are unique from any other instances that will be running on this host. 2) Setup any new folders you need to create (including assigning privileges) 3) Document those names and any other settings you want this additional instance to use in a configuration file specific for this instance 4) Use that special configuration file to bootstrap (initialize) the data files used to manage that instance (the --initialize instructions were linked to earlier in this reply) 5) Once you have this instance setup the way you want. Shut it down. 6) Copy the elements that are unique to this instance into an appropriately-named section of your common configuration file (the one that mysqld_multi will read) 7) Test that you can start/stop this new instance using mysqld_multi As you can tell, it takes a bit of planning and effort to establish a non-default setup of hosting multiple MySQL instances on the same host machine. There is no simple one-line command to tell mysqld_multi to create a new instance as there are things it cannot do (like create folders in your file system). Regards, -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Integrated Cloud Applications & Platform Services Office: Blountville, TN Become certified in MySQL! Visit https://www.mysql.com/certification/ for details. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
can't you just stop reply-all so that responses are going back to the list Am 20.05.2017 um 12:01 schrieb Johan De Meersman: He means a database, not a schema. Instance would have been clearer as terminology goes, admittedly, but in a MySQL context the two are identical. database and instance are identical? > I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to > replace an aging 5.1 system running on RHEL 5. We run > mysqld_multi with multiple instances, each database on its > own TCP Port 33xx. I'm having trouble creating a database > on the new server in a multi environment. i still have no idea what is the problem * connect to the instance with "mysql -h 127.0.0.1 -P 3307 -u root -p" * create database dbname -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
He means a database, not a schema. Instance would have been clearer as terminology goes, admittedly, but in a MySQL context the two are identical. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
Am 19.05.2017 um 18:42 schrieb Matthew Black: Sorry, but that is not the least bit helpful. We are not ready for RHEL 7, which is VERY different than prior versions. I don't really need the victim blaming for using an earlier RHEL release that is still fully supported and in widespread use. your problem - we are using Fedora in production since 2008 and systemd was introduced that i even can't remember the sysvinit mess... As for /etc/my.cnf, that's where one defines the port, database location, log file, port number, and user, so they don't have to be placed on the command line. and how do you imagine hat to work for *multiple instances* Your response does not explain the command line steps necessary for creating a new database. becasue creating a database is absolutely basic stuff at all and if you mean the mysql database with users itself - well, i hvanet created one from scratch since 2003 because they are portable between windows/linux/osx and i just rsync the folder or a baisc install and that's it -Original Message- From: Reindl Harald [mailto:h.rei...@thelounge.net] Sent: Friday, May 19, 2017 9:27 AM To: mysql@lists.mysql.com Subject: Re: mysqld_multi Am 19.05.2017 um 18:19 schrieb Matthew Black: I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, each database on its own TCP Port 33xx. I'm having trouble creating a database on the new server in a multi environment. Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311? what has this to do with the my.cnf? just connect to the correct instance and that's it and probably get rid of RHEL6 because with systemd you don't need all the crap around to start multiple instances, just a few lines in the unit-file pointing to the correct config and mysqld_safe is also no needed [harry@srv-rhsoft:~]$ mysql --help | grep port -P, --port=#Port number to use for connection or 0 for default to, in --progress-reports Get progress reports for long running commands (like (Defaults to on; use --skip-progress-reports to disable.) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: mysqld_multi
Sorry, but that is not the least bit helpful. We are not ready for RHEL 7, which is VERY different than prior versions. I don't really need the victim blaming for using an earlier RHEL release that is still fully supported and in widespread use. As for /etc/my.cnf, that's where one defines the port, database location, log file, port number, and user, so they don't have to be placed on the command line. Your response does not explain the command line steps necessary for creating a new database. matthew -Original Message- From: Reindl Harald [mailto:h.rei...@thelounge.net] Sent: Friday, May 19, 2017 9:27 AM To: mysql@lists.mysql.com Subject: Re: mysqld_multi Am 19.05.2017 um 18:19 schrieb Matthew Black: > I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging > 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, > each database on its own TCP Port 33xx. I'm having trouble creating a > database on the new server in a multi environment. > > Can anyone provide a simple example of how to edit /etc/my.cnf file and > command line steps necessary for creating a new database running on, for > example, port 3311? what has this to do with the my.cnf? just connect to the correct instance and that's it and probably get rid of RHEL6 because with systemd you don't need all the crap around to start multiple instances, just a few lines in the unit-file pointing to the correct config and mysqld_safe is also no needed [harry@srv-rhsoft:~]$ mysql --help | grep port -P, --port=#Port number to use for connection or 0 for default to, in --progress-reports Get progress reports for long running commands (like (Defaults to on; use --skip-progress-reports to disable.) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqld_multi
Am 19.05.2017 um 18:19 schrieb Matthew Black: I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, each database on its own TCP Port 33xx. I'm having trouble creating a database on the new server in a multi environment. Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311? what has this to do with the my.cnf? just connect to the correct instance and that's it and probably get rid of RHEL6 because with systemd you don't need all the crap around to start multiple instances, just a few lines in the unit-file pointing to the correct config and mysqld_safe is also no needed [harry@srv-rhsoft:~]$ mysql --help | grep port -P, --port=#Port number to use for connection or 0 for default to, in --progress-reports Get progress reports for long running commands (like (Defaults to on; use --skip-progress-reports to disable.) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
mysqld_multi
I just installed MySQL Enterprise Edition 5.7 on RHEL 6.8 to replace an aging 5.1 system running on RHEL 5. We run mysqld_multi with multiple instances, each database on its own TCP Port 33xx. I'm having trouble creating a database on the new server in a multi environment. Can anyone provide a simple example of how to edit /etc/my.cnf file and command line steps necessary for creating a new database running on, for example, port 3311? Thanks in advance. matthew
Re: Show master status - "mysqld_multi" - distribution master[SOLVED]
On 23/08/16 11:26, sujeet gupta wrote: Hi Dear, It's not a mysql issue, show me every step you followed to create master slave hierarchy. Its like you missed some steps while configuring server. Show master configuration and slave configuration separately. On Aug 23, 2016 6:45 PM, "Jose Julian Buda" mailto:jb...@noticiasargentinas.com>> wrote: Hi, i have a server acting as a replication distribution master(taking from the real master), with several mysql instances (instance 1,instance 2...) with mysqld_multi script, and many replication filters just to avoid using bandwidth to the remote datacenters with useless data. It's working fine, but when i need to see the log pos of an instance to sync the replication or anything else(for example a delay in the links): mysql -P instance_1_port -u user -ppassword mysql>show master status; It show me the wrong logfile name and position, in fact it show always the same log file name, not the file that the slave is taking to replicate("show slave status" on slave), regardeless the mysql instance port. And "show slave status" on master dont show me the Replicate_Do_DB/ Replicate_Do_Table rules applied in each instance, but everything is working fine. How can i see the right logfile name/position(show master status) for each mysql instance on the replication distribution master? Is it a mysql client issue? The log distribution server is running MySql 5.5.50 Thank you in advance. -- Jose Julian Buda -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql Thank you, it was a mysql client issue. The client always connects through default sockets unless you specify a host, so this commands work fine: mysql -h 127.0.0.1 -P instance_1_port -u user -ppassword mysql -h 127.0.0.1 -P instance_2_port -u user -ppassword ... ... and so for all instances port, it show me the right log filename and its position and every Replicate_Do* settings, for each mysql instances. Thank you Jose Julian Buda -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Show master status - "mysqld_multi" - distribution master
Hi, i have a server acting as a replication distribution master(taking from the real master), with several mysql instances (instance 1,instance 2...) with mysqld_multi script, and many replication filters just to avoid using bandwidth to the remote datacenters with useless data. It's working fine, but when i need to see the log pos of an instance to sync the replication or anything else(for example a delay in the links): mysql -P instance_1_port -u user -ppassword mysql>show master status; It show me the wrong logfile name and position, in fact it show always the same log file name, not the file that the slave is taking to replicate("show slave status" on slave), regardeless the mysql instance port. And "show slave status" on master dont show me the Replicate_Do_DB/ Replicate_Do_Table rules applied in each instance, but everything is working fine. How can i see the right logfile name/position(show master status) for each mysql instance on the replication distribution master? Is it a mysql client issue? The log distribution server is running MySql 5.5.50 Thank you in advance. -- Jose Julian Buda -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
mysqld_multi doesn't support !include or !includedir directives
Hi, I try to use !includedir directive with mysqld_multi for load other option files but nothing is loaded by mysql. In the default my.cnf, I have only the includedir directive for my configuration directory : !includedir /etc/my.cnf.d And in /etc/my.cnf.d/mysql3306.cnf I have : [mysqld_multi] mysqld = /usr/bin/mysqld_safe mysqladmin = /usr/bin/mysqladmin user = toto password = toto log= /var/log/mysqld_multi.log [mysqld3306] port = 3306 socket = /var/lib/mysql_3306/mysql.sock pid-file = /var/lib/mysql_3306/test.pid datadir = /var/lib/mysql_3306 tmpdir = /tmp user = mysql mysqld = /usr/sbin/mysqld log-error= /var/lib/mysql_3306/test.err But mysqld_multi doesn't not load mysql3306.cnf file. # service mysqld_multi report Reporting MySQL servers No groups to be reported (check your GNRs) Whereas # my_print_defaults --defaults-file=/etc/my.cnf mysqld3306 --port=3306 --socket=/var/lib/mysql_3306/mysql.sock --pid-file=/var/lib/mysql_3306/test.pid --datadir=/var/lib/mysql_3306 --tmpdir=/tmp --user=mysql I found the Bug #29327 dated 2007 but without fix. I use mysqld_multi log file version 2.16 and MySQL 5.6.24 on CentOS 6. Someone as an idea please? Where is my mistake? Regards, Thomas
Re: starting multiple instances with mysqld_multi
Hi,Nitin Below information for your reference. for my.cnf [mysqld5129] port=5506 socket=/tmp/mysql5129.sock basedir=/opt/MySQL5129 datadir=/opt/MySQL5129/var user=mysql log-error=/var/log/mysqld5129.log pid-file=/tmp/mysqld5129.pid #log-bin=/opt/MySQL5129/binlog long_query_time=2 log-slow-queries=/opt/MySQL5129/slowlog default-character-set=utf8 [mysqld607] port=5507 socket=/tmp/mysql607.sock basedir=/opt/MySQL607 datadir=/opt/MySQL607/var user=mysql log-error=/var/log/mysqld607.log pid-file=/tmp/mysqld607.pid bind-address=127.0.0.1 skip-name-resolve For start/stop == -bash-3.1# cat /opt/MySQL5129start.sh /opt/MySQL5129/bin/mysqld_multi start 5129 -bash-3.1# cat /opt/MySQL5129stop.sh /opt/MySQL5129/bin/mysqld_multi stop 5129 -bash-3.1# cat /opt/MySQL607start.sh /opt/MySQL607/bin/mysqld_multi start 607 -bash-3.1# cat /opt/MySQL607stop.sh /opt/MySQL607/bin/mysqld_multi stop 607 == Best Regards! Yang Wang Email: yw...@lfm-agile.com.hk - Original Message - From: "Nitin Mehta" To: "Prabhat Kumar" Cc: Sent: Tuesday, May 11, 2010 6:19 PM Subject: Re: starting multiple instances with mysqld_multi Thanks, Prabhat! You're very right, but did you read the questions I asked? From: Prabhat Kumar To: Nitin Mehta Cc: mysql@lists.mysql.com Sent: Tue, May 11, 2010 11:54:22 AM Subject: Re: starting multiple instances with mysqld_multi Hi, You can run multiple instances on the same host and specify configuration options either by adding the options as arguments on the command line, or by storing them in configuration files. for example, from the command line: shell> mysqld --port 3306 --log=/path/to/server1/log shell> mysqld --port 3307 --log=/path/to/server2/log So, when MySQL starts up it reads various config files in sequence. This means that you can set global options for all instances in one file and then specific options for individual instances in separate files. The files it reads by default are (on linux) >>/etc/my.cnf >>the_mysql_data_dir/my.cnf >>~/.my.cnf >> You can direct the server to read specific config files after it reads the default /etc/my.cnf file with the following directive. --defaults-extra-file=/path/to/extra/config/file So, if you wanted 2 instances running with some shared options and some specific options, you could create additional configuration files in /etc say: /etc/my.server1.cnf /etc/my.server2.cnf where my.server1.cnf has the following lines: port=3306 log=/path/to/log/file/for/server1 (other options here) and my.server2.cnf is: port=3307 log=/path/to/log/file/for/server2 (other options here) then you could start the separate instances of mysqld as follows: shell> mysqld --defaults-extra-file=/etc/my.server1.cnf shell> mysqld --defaults-extra-file=/etc/my.server2.cnf about mysqld_multi mysqld_multi >>mysqld_multi [ options] {start| stop| report} [ server_id] >Use this to run multiple MySQL servers on different socket files and ports. To >set up >multiple servers, a different section of server options must be entered into a >configuration file (e.g., /etc/my.cnf). The naming scheme for each section >must be [mysqldn] >>where n is a different number for each server. Options must be entered >>separately for >each server in its own section, even when servers use the same options. At a >minimum, >each server should use a different socket file and a different TCP/IP port. To >see an >>example of how a configuration file might be set up for multiple servers, >>enter the >following from the command line: >mysqld_multi --example >Once multiple servers have been configured, to start a server, you can enter >something >>like the following from the command line: >mysqld_multi start 3 >This line would start server number 3 listed in the configuration file as >[mysqld3]. By >entering report for the first argument, you can obtain the status on the >server. For >>starting and stopping the server, this script uses the mysqladmin utility. >>Here is an >alphabetical list of options specific to mysqld_multi that you can enter from >the >command line, along with a brief explanation of each: >>--config-file=filename >Specifies the path and name of the server’s configuration file if it is >different from >the default. >--example >Displays a sample configuration file. >--help >Displays basic help information. >>--log=filename >Sets the path and name of the logfile. The default is /tmp/mysqld_multi.log. >--mysqladmin=path >Sets the path to the mysqladmin utility. >--mysqld=path >Specifies the path to mysqld. >--no-log >>In
Re: starting multiple instances with mysqld_multi
Thanks, Prabhat! You're very right, but did you read the questions I asked? From: Prabhat Kumar To: Nitin Mehta Cc: mysql@lists.mysql.com Sent: Tue, May 11, 2010 11:54:22 AM Subject: Re: starting multiple instances with mysqld_multi Hi, You can run multiple instances on the same host and specify configuration options either by adding the options as arguments on the command line, or by storing them in configuration files. for example, from the command line: shell> mysqld --port 3306 --log=/path/to/server1/log shell> mysqld --port 3307 --log=/path/to/server2/log So, when MySQL starts up it reads various config files in sequence. This means that you can set global options for all instances in one file and then specific options for individual instances in separate files. The files it reads by default are (on linux) >>/etc/my.cnf >>the_mysql_data_dir/my.cnf >>~/.my.cnf >> You can direct the server to read specific config files after it reads the default /etc/my.cnf file with the following directive. --defaults-extra-file=/path/to/extra/config/file So, if you wanted 2 instances running with some shared options and some specific options, you could create additional configuration files in /etc say: /etc/my.server1.cnf /etc/my.server2.cnf where my.server1.cnf has the following lines: port=3306 log=/path/to/log/file/for/server1 (other options here) and my.server2.cnf is: port=3307 log=/path/to/log/file/for/server2 (other options here) then you could start the separate instances of mysqld as follows: shell> mysqld --defaults-extra-file=/etc/my.server1.cnf shell> mysqld --defaults-extra-file=/etc/my.server2.cnf about mysqld_multi mysqld_multi >>mysqld_multi [ options] {start| stop| report} [ server_id] >Use this to run multiple MySQL servers on different socket files and ports. To >set up >multiple servers, a different section of server options must be entered into a >configuration file (e.g., /etc/my.cnf). The naming scheme for each section >must be [mysqldn] >>where n is a different number for each server. Options must be entered >>separately for >each server in its own section, even when servers use the same options. At a >minimum, >each server should use a different socket file and a different TCP/IP port. To >see an >>example of how a configuration file might be set up for multiple servers, >>enter the >following from the command line: >mysqld_multi --example >Once multiple servers have been configured, to start a server, you can enter >something >>like the following from the command line: >mysqld_multi start 3 >This line would start server number 3 listed in the configuration file as >[mysqld3]. By >entering report for the first argument, you can obtain the status on the >server. For >>starting and stopping the server, this script uses the mysqladmin utility. >>Here is an >alphabetical list of options specific to mysqld_multi that you can enter from >the >command line, along with a brief explanation of each: >>--config-file=filename >Specifies the path and name of the server’s configuration file if it is >different from >the default. >--example >Displays a sample configuration file. >--help >Displays basic help information. >>--log=filename >Sets the path and name of the logfile. The default is /tmp/mysqld_multi.log. >--mysqladmin=path >Sets the path to the mysqladmin utility. >--mysqld=path >Specifies the path to mysqld. >--no-log >>Instructs the utility not to save messages to a log, but to send them to >>stdout >instead. >--password=password >Provides the password for using mysqladmin. >--tcp-ip >Enables TCP/IP communication with the server instead of using a Unix-domain >>socket. >--user=user >Provides the username for using mysqladmin. The same user must be used for all >servers. >--version >Displays the version of the utility. > Thanks, On Tue, May 11, 2010 at 9:54 AM, Nitin Mehta wrote: >Hi, > >>I am exploring multiple instances with MySQL which will be running using the >>same set of binaries (single MySQL base). Two things which I'm not able to >>work out are - > >>1. Why mysqld_multi stop doesn't work? Well, I know why it >> doesn't because there is nothing in the script to handle a 'stop' call; the >> actual question would be - why it doesn't work when it is mentioned in the >> MySQL reference manual? >> >2. how to (auto) restart the instances after a server restart? do I > need to write my own script for this or is there anything available which I'm > not aware of? >>If you have resolved these issues, please let me know. >> >> >>Best Regards, >Nitin > > >> -- Best Regards, Prabhat Kumar MySQL DBA Datavail-India Mumbai Mobile : 91-9987681929 www.datavail.com My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat
Re: starting multiple instances with mysqld_multi
Hi, You can run multiple instances on the same host and specify configuration options either by adding the options as arguments on the command line, or by storing them in configuration files. for example, from the command line: shell> mysqld --port 3306 --log=/path/to/server1/log shell> mysqld --port 3307 --log=/path/to/server2/log So, when MySQL starts up it reads various config files in sequence. This means that you can set global options for all instances in one file and then specific options for individual instances in separate files. The files it reads by default are (on linux) /etc/my.cnf > the_mysql_data_dir/my.cnf > ~/.my.cnf > You can direct the server to read specific config files after it reads the default /etc/my.cnf file with the following directive. --defaults-extra-file=/path/to/extra/config/file So, if you wanted 2 instances running with some shared options and some specific options, you could create additional configuration files in /etc say: /etc/my.server1.cnf /etc/my.server2.cnf where my.server1.cnf has the following lines: port=3306 log=/path/to/log/file/for/server1 (other options here) and my.server2.cnf is: port=3307 log=/path/to/log/file/for/server2 (other options here) then you could start the separate instances of mysqld as follows: shell> mysqld --defaults-extra-file=/etc/my.server1.cnf shell> mysqld --defaults-extra-file=/etc/my.server2.cnf about *mysqld_multi* > *mysqld_multi* > mysqld_multi [ options] {start| stop| report} [ server_id] > Use this to run multiple MySQL servers on different socket files and ports. > To set up > multiple servers, a different section of server options must be entered > into a configuration file (e.g., /etc/my.cnf). The naming scheme for each > section must be [mysqldn] > where n is a different number for each server. Options must be entered > separately for > each server in its own section, even when servers use the same options. At > a minimum, > each server should use a different socket file and a different TCP/IP port. > To see an > example of how a configuration file might be set up for multiple servers, > enter the > following from the command line: > mysqld_multi --example > Once multiple servers have been configured, to start a server, you can > enter something > like the following from the command line: > mysqld_multi start 3 > This line would start server number 3 listed in the configuration file as > [mysqld3]. By > entering report for the first argument, you can obtain the status on the > server. For > starting and stopping the server, this script uses the mysqladmin utility. > Here is an > alphabetical list of options specific to mysqld_multi that you can enter > from the > command line, along with a brief explanation of each: > --config-file=filename > Specifies the path and name of the server’s configuration file if it is > different from > the default. > --example > Displays a sample configuration file. > --help > Displays basic help information. > --log=filename > Sets the path and name of the logfile. The default is > /tmp/mysqld_multi.log. > --mysqladmin=path > Sets the path to the mysqladmin utility. > --mysqld=path > Specifies the path to mysqld. > --no-log > Instructs the utility not to save messages to a log, but to send them to > stdout > instead. > --password=password > Provides the password for using mysqladmin. > --tcp-ip > Enables TCP/IP communication with the server instead of using a Unix-domain > socket. > --user=user > Provides the username for using mysqladmin. The same user must be used for > all > servers. > --version > Displays the version of the utility. > Thanks, On Tue, May 11, 2010 at 9:54 AM, Nitin Mehta wrote: > Hi, > > I am exploring multiple instances with MySQL which will be running using > the same set of binaries (single MySQL base). Two things which I'm not able > to work out are - > >1. Why mysqld_multi stop doesn't work? Well, I know why it > doesn't because there is nothing in the script to handle a 'stop' call; the > actual question would be - why it doesn't work when it is mentioned in the > MySQL reference manual? >2. how to (auto) restart the instances after a server restart? do I > need to write my own script for this or is there anything available which > I'm not aware of? > If you have resolved these issues, please let me know. > > > Best Regards, > Nitin > > > -- Best Regards, Prabhat Kumar MySQL DBA Datavail-India Mumbai Mobile : 91-9987681929 www.datavail.com My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat
starting multiple instances with mysqld_multi
Hi, I am exploring multiple instances with MySQL which will be running using the same set of binaries (single MySQL base). Two things which I'm not able to work out are - 1. Why mysqld_multi stop doesn't work? Well, I know why it doesn't because there is nothing in the script to handle a 'stop' call; the actual question would be - why it doesn't work when it is mentioned in the MySQL reference manual? 2. how to (auto) restart the instances after a server restart? do I need to write my own script for this or is there anything available which I'm not aware of? If you have resolved these issues, please let me know. Best Regards, Nitin
using mysqld_multi - reboot only session 1 starts.
We are using mysqld_multi to start three instances, the command /usr/ bin/mysqld_multi --config-file=/etc/my.cnf start 1-3 works just fine. But when I tried to put that in rc.local only 3306 would start. Ok fine. So I created 3 scripts that I put in /etc/init.d called mysqld1, 2, and 3. So now /sbin/service mysqld start | stop | status all work just fine. I then added them to run level 3. I can stop, start, and status any or all but when I reboot I have a problem. $ sudo /sbin/service mysqld status Reporting MySQL servers MySQL server from group: mysqld1 is running MySQL server from group: mysqld2 is not running MySQL server from group: mysqld3 is not running $ sudo /sbin/service mysqld2 start $ sudo /sbin/service mysqld status Reporting MySQL servers MySQL server from group: mysqld1 is running MySQL server from group: mysqld2 is running MySQL server from group: mysqld3 is not running $ sudo /sbin/chkconfig --list | grep mysql mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off mysqld1 0:off 1:off 2:off 3:on4:off 5:off 6:off mysqld2 0:off 1:off 2:off 3:on4:off 5:off 6:off mysqld3 0:off 1:off 2:off 3:on4:off 5:off 6:off $ sudo tail /var/log/mysql/mysqld3.log 090513 16:06:50 [ERROR] Can't start server: Bind on TCP/IP port: Permission denied 090513 16:06:50 [ERROR] Do you already have another mysqld server running on port: 3308 ? 090513 16:06:50 [ERROR] Aborting 090513 16:06:50 InnoDB: Starting shutdown... 090513 16:06:52 InnoDB: Shutdown completed; log sequence number 0 195828884 090513 16:06:52 [Note] /usr/libexec/mysqld: Shutdown complete 090513 16:06:52 mysqld ended I have this same error but for port 3307 for mysqld2 but as you can see it starts just fine when I run it after the server is up, why? Any help greatly appreciated. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
multiple nistances at boot with mysqld_multi or other
I am trying to get a few instances of mysql running at boot time - and I have come across the command mysqld_multi. Seems to have a lot of documentation about kicking those off via command line - but not much on setting it up to start at boot. anyone have any insight into this? Either using mysqld_multi or a different startup script? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_multi startup stop
Sounds like you need to configure a user that has SHUTDOWN privileges. From: http://dev.mysql.com/doc/refman/5.0/en/mysqld-multi.html Make sure that the MySQL account used for stopping the mysqld servers (with the mysqladmin program) has the same username and password for each server. Also, make sure that the account has the SHUTDOWN privilege. If the servers that you want to manage have different usernames or passwords for the administrative accounts, you might want to create an account on each server that has the same username and password. For example, you might set up a common multi_admin account by executing the following commands for each server: shell> mysql -u root -S /tmp/mysql.sock -p Enter password: mysql> GRANT SHUTDOWN ON *.* -> TO 'multi_admin'@'localhost' IDENTIFIED BY 'multipass'; The username/password goes in your my.cnf under a [mysqld_multi] section. Atle - Flying Crocodile Inc, Unix Systems Administrator On Sat, 21 Oct 2006, Low Kian Seong wrote: > Dear all, > > I am running the official mysql rpms on a sles 9 box, and I am running > multiple versions of mysql servers on different ports. The problem I > am facing is that when i run > > mysqld_multi start > > it starts the servers up fine but when i do the reverse : > > mysqld_multi stop , > > it doesn't stop the server and I have to manually search for the pids > and execute a kill on the process to stop it. > > Anybody have any idea ? > > Thank you in advance. > > Low Kian Seong > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi startup stop
Dear all, I am running the official mysql rpms on a sles 9 box, and I am running multiple versions of mysql servers on different ports. The problem I am facing is that when i run mysqld_multi start it starts the servers up fine but when i do the reverse : mysqld_multi stop , it doesn't stop the server and I have to manually search for the pids and execute a kill on the process to stop it. Anybody have any idea ? Thank you in advance. Low Kian Seong -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: unable to start mysqld_multi
Hello. Check the --no-log option for mysqld_multi to see it's messages on your console. What is in servers' error logs? PRASHANT N <[EMAIL PROTECTED]> wrote: > hi > > as per the online manual, i have configured mysql and able to run the server > as mysqld_safe. but if i want to run mysqld_multi with the following > configuration it doesnt work... the config file is like > [mysqld_multi] > mysqld = /usr/local/mysql/bin/mysqld_safe > mysqladmin = /usr/local/mysql/bin/mysqladmin > user = mutli_admin > password = admin_multi > > [mysqld2] > socket = /tmp/mysql.sock2 > port = 3307 > pid-file = /usr/local/mysql/var2/hostname.pid2 > datadir= /usr/local/mysql/var2 > user = amitg > > [mysqld3] > socket = /tmp/mysql.sock3 > port = 3308 > pid-file = /usr/local/mysql/var3/hostname.pid3 > datadir= /usr/local/mysql/var3 > user = shann > i am starting the server with the following command > /usr/local/mysql/bin/mysqld_multi start > this command doesnt throw any errors as such and the report i am getting my > executing the command > /usr/local/mysql/bin/mysqld_multi report is > Reporting MySQL servers > MySQL server from group: mysqld2 is not running > MySQL server from group: mysqld3 is not running > what am i doing wrong. please guide me > regards > shann > > > ___ > Have your own email and web address for life. > > http://www.homemaster.net - Homemaster. Come Together. Online. > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
unable to start mysqld_multi
hi as per the online manual, i have configured mysql and able to run the server as mysqld_safe. but if i want to run mysqld_multi with the following configuration it doesnt work... the config file is like [mysqld_multi] mysqld = /usr/local/mysql/bin/mysqld_safe mysqladmin = /usr/local/mysql/bin/mysqladmin user = mutli_admin password = admin_multi [mysqld2] socket = /tmp/mysql.sock2 port = 3307 pid-file = /usr/local/mysql/var2/hostname.pid2 datadir= /usr/local/mysql/var2 user = amitg [mysqld3] socket = /tmp/mysql.sock3 port = 3308 pid-file = /usr/local/mysql/var3/hostname.pid3 datadir= /usr/local/mysql/var3 user = shann i am starting the server with the following command /usr/local/mysql/bin/mysqld_multi start this command doesnt throw any errors as such and the report i am getting my executing the command /usr/local/mysql/bin/mysqld_multi report is Reporting MySQL servers MySQL server from group: mysqld2 is not running MySQL server from group: mysqld3 is not running what am i doing wrong. please guide me regards shann ___ Have your own email and web address for life. http://www.homemaster.net - Homemaster. Come Together. Online. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_multi at startup on Mac OS X not working
> I have successfully configured mysqld_multi to have mysql 4.1.11 and > 5.0.3 beta running on the same machine: > I would like to see how you configured mysqld_multi to do that, if you could send me the information off list I'd appreciate it. > # mysqld_multi start & > # exit > % mysqld_multi report > Reporting MySQL servers > MySQL server from group: mysqld4 is running > MySQL server from group: mysqld5 is running > % > > However, I can't get this to work at system startup time. Starting up > a single mysql server works fine, with the following > /Library/StartupItems/MySQL/MySQL script: > > #!/bin/sh > > . /etc/rc.common > > if [ "${MYSQL:=-YES-}" = "-YES-" ]; then > > ConsoleMessage "Starting MySQL database server" > /usr/local/mysql/bin/mysqld_safe & > fi > > But if I change " /usr/local/mysql/bin/mysqld_safe &" to " > /usr/local/mysql/bin/mysqld_multi start &", no servers start up. There > are also no error messages in the .err logs: the last item there is > the previous 'normal shutdown'. > > Any ideas? I would think that there should be no difference between > executing mysqld_multi from a root shell and executing it at startup > time, but apparently it's not the same. > You need to be careful... There isn't a difference between running mysqld_multi at the command line and running it inside a script - remember what you are running at startup isn't mysqld_multi but rather this command: /System/Library/StartupItems/MySQL/MySQL start That script then calls mysqld_multi, or not, depending on some variables in the script... What happens when you run /System/Library/StartupItems/MySQL/MySQL start At the command prompt... I venture a guess that the results are still no mysqls start. Let me share my startup script with you... #!/bin/sh . /etc/rc.common StartService () { if [ "${MYSQL=-NO-}" = "-YES-" ]; then ConsoleMessage "Starting MySQL" /usr/local/mysql/bin/mysqld_multi start fi } StopService () { /usr/bin/mysqladmin ping >/dev/null 2>&1 if [ $? -eq 0 ]; then ConsoleMessage "Stopping MySQL" /usr/local/mysql/bin/mysqladmin --socket=/tmp/mysql.sock shutdown /usr/local/mysql/bin/mysqladmin --socket=/tmp/mysql2.sock shutdown else ConsoleMessage "MySQL is not running" fi } RestartService () { StopService StartService } RunService "$1" There are some minor differences in how mine (which is working) and yours seem to be configured... Let's look at those... What version of OS X are you working on? Mine is running on 10.3.8, has been running on the previous versions of 10.3 also. The major difference I see is the test on if to start or not... This will be important. You have: if [ "${MYSQL:=-YES-}" = "-YES-" ]; then While I have: if [ "${MYSQL=-NO-}" = "-YES-" ]; then I don't know why yours is different, I know that mine works, it is Apple's script and test, I just changed the binary it executes. The other factor here is /etc/hostconfig - it must have a line that looks like this: MYSQL=-YES- If YES is actually NO or if the line is not present at all, the startup script will not execute the script. Actually /etc/hostconfig is what the Startup scripts use to tell it what to start or not, if you want to bounce your server and not have mysql start when it reboots you can edit /etc/hostconfig and set the YES to a NO for the MYSQL=-YES- line, just be sure to change it back when you are done. When all is said and done you don't need to restart the whole machine to see if your script is working.. You can simply run: /System/Library/StartupItems/MySQL/MySQL start And you will find out if you are working. I also have some changes in the shutdown part of the script, because I use mysqld_multi to start it, the original use of mysqladmin to shutdown the single instance isn't going to shutdown both instances... So I add a line for each instance to call "mysqladmin shutdown" and point it to each socket file that is configured in the my.cnf file for each instance. Hope that helps. Best Regards, Bruce -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi at startup on Mac OS X not working
Greetings, I have successfully configured mysqld_multi to have mysql 4.1.11 and 5.0.3 beta running on the same machine: # mysqld_multi start & # exit % mysqld_multi report Reporting MySQL servers MySQL server from group: mysqld4 is running MySQL server from group: mysqld5 is running % However, I can't get this to work at system startup time. Starting up a single mysql server works fine, with the following /Library/StartupItems/MySQL/MySQL script: #!/bin/sh . /etc/rc.common if [ "${MYSQL:=-YES-}" = "-YES-" ]; then ConsoleMessage "Starting MySQL database server" /usr/local/mysql/bin/mysqld_safe & fi But if I change " /usr/local/mysql/bin/mysqld_safe &" to " /usr/local/mysql/bin/mysqld_multi start &", no servers start up. There are also no error messages in the .err logs: the last item there is the previous 'normal shutdown'. Any ideas? I would think that there should be no difference between executing mysqld_multi from a root shell and executing it at startup time, but apparently it's not the same. Thanks in advance, Jan Pieter Kunst -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi
I now have multiple installations running on the same machine, and am also using mysqld_multi. However, even though it's working, there's one thing I don't understand. Why does the [mysqld_multi] section have to contain the pointers to mysqld and mysqladmin? It seems to me that it should just go right to the section that's tied to the parameter given to the start script, i.e. "mysqld_multi start 1" should go right to the [mysqld1] section and get the info it needs from there. However, until I put both variables in the [mysqld_multi] section, it didn't work and gave me an error that it was looking for mysqld and mysqladmin in the /var/lib/mysql directory. Here is my my.cnf file. [mysqld_multi] mysqld = /usr/local/mysql420/bin/mysqld mysqladmin = /usr/local/mysql420/bin/mysqladmin [mysqld1] basedir= /usr/local/mysql420 mysqld = /usr/local/mysql420/bin/mysqld port = 3307 socket = /usr/local/mysql420/mysql420.sock pid-file = /usr/local/mysql420/my420.pid [mysqld2] basedir= /usr/local/mysql500 mysqld = /usr/local/mysql500/bin/mysqld port = 3306 socket = /usr/local/mysql500/mysql500.sock pid-file = /usr/local/mysql500/my500.pid
RE: mysqld_multi & different server versions
You can use mysqld_multi to run different versions of MySQL on the same Server. You can run 4.0.x, 4.1.x and 5.0.x and manage these with mysqld_multi. -Original Message- From: sean c peters To: [EMAIL PROTECTED] Sent: 8/9/04 4:43 PM Subject: mysqld_multi & different server versions In my ongoing quest to get upgraded to 4.1.3 beta (yes the version I'm upgrading to keeps changing), i have been reading about mysqld_multi to manage multiple server instances on the same machine. But, from what i've read, it appears that this is for running multiple instances of the same server version on one box. Same binary anyway. I say this because all the examples show as varying are the socket, port, pid-file, datadir, language, and user. The [mysqld_multi] directive for my.cnf points mysqld at a particular mysqld_safe, which would imply that all the instances would use the same server. So am i correct in thinking that i wont be able to use mysqld_multi for running two different server versions? This shouldn't be a problem, I dont think i'll need it. Just wanted to check if im missing something. thanks sean peters [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqld_multi & different server versions
DVP Dathan Vance Pattishall http://www.friendster.com > -Original Message- > From: sean c peters [mailto:[EMAIL PROTECTED] > Sent: Monday, August 09, 2004 1:43 PM > To: [EMAIL PROTECTED] > Subject: mysqld_multi & different server versions > > So am i correct in thinking that i wont be able to use mysqld_multi for > running two different server versions? This shouldn't be a problem, I dont > think i'll need it. Just wanted to check if im missing something. This is not entirely correct. A basedir definition will allow you do execute the safe_mysqld in the directory installed. > > thanks > sean peters > [EMAIL PROTECTED] > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi & different server versions
In my ongoing quest to get upgraded to 4.1.3 beta (yes the version I'm upgrading to keeps changing), i have been reading about mysqld_multi to manage multiple server instances on the same machine. But, from what i've read, it appears that this is for running multiple instances of the same server version on one box. Same binary anyway. I say this because all the examples show as varying are the socket, port, pid-file, datadir, language, and user. The [mysqld_multi] directive for my.cnf points mysqld at a particular mysqld_safe, which would imply that all the instances would use the same server. So am i correct in thinking that i wont be able to use mysqld_multi for running two different server versions? This shouldn't be a problem, I dont think i'll need it. Just wanted to check if im missing something. thanks sean peters [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi
Hi, Can someone tell me how I can use mysqld_multi to have one RPM installation of MySQL(default with RedHat9) to run multiple mysqlds? Thanks -Minuk -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_multi
Date: Wed, 14 Apr 2004 13:26:10 -0400 To: [EMAIL PROTECTED] From: "Pingouin Team" <[EMAIL PROTECTED]> Subject: mysqld_multi Message-Id: <[EMAIL PROTECTED]> Hi, I need help. I have my old mysql server running in my web server and I can't stop it for make the test of the new version (3.28 to 4.0). I have installed with compilation of the source code and configure my socket, var and port. I have make a config file with the --example: [mysqld_multi] mysqld = /home/benoit/mysql/bin/safe_mysqld mysqladmin = /home/benoit/mysql/bin/mysqladmin user = multi_admin password = multipass [mysqld2] socket = /home/benoit/tmp/mysql.sock port = 3310 pid-file = /home/benoit/mysql/var/pingouin.pid datadir = /home/benoit/mysql/var language = /home/benoit/mysql/share/mysql/english And I start my MySQL with ./mysqld_multi --config-file=/home/benoit/mysql/etc/my.cnf start 2 but when I execute that command line MySQL start and stop. In the log, I can see just that: mysqld_multi log file version 2.2; run: Wed Apr 14 13:01:02 2004 Starting MySQL servers Starting mysqld daemon with databases from /home/benoit/mysql/var 040414 13:01:05 mysqld ended Why the server do not stay online? Thank you, Benoit Tremblay -- NerdzTeam [EMAIL PROTECTED] ### Servus, to know what stops your MySQL Daemon you must look in your Log-File of this one. I don't know where it is in your system but it helps to add a separate one in [mysqld2] err-log = /var/log/mysql2d/mysqld.log and then look for the real problem (probably permissions ;-) But maybe you should wait an moment, because I have with this mysqld_multi a problem who can give you some trouble, too! As soon as I start the second Daemon the Socket of the first (main) Daemon disappears!! You can connect over TCP, but by default it tries the Socket at localhost. I have MySQL 5.0 running and maybe you haven't got this problem, but think about it. I posted about my Problem to the List ("mysqld_multi kills socket from previous Daemon" from 2004-04-07), but up to now I haven't got an answer and still don't know what’s going on with my Sockets! (Has someone an Idea ??) Best regards, Tobias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi
Hi, I need help. I have my old mysql server running in my web server and I can't stop it for make the test of the new version (3.28 to 4.0). I have installed with compilation of the source code and configure my socket, var and port. I have make a config file with the --example: [mysqld_multi] mysqld = /home/benoit/mysql/bin/safe_mysqld mysqladmin = /home/benoit/mysql/bin/mysqladmin user = multi_admin password = multipass [mysqld2] socket = /home/benoit/tmp/mysql.sock port = 3310 pid-file = /home/benoit/mysql/var/pingouin.pid datadir= /home/benoit/mysql/var language = /home/benoit/mysql/share/mysql/english And I start my MySQL with ./mysqld_multi --config-file=/home/benoit/mysql/etc/my.cnf start 2 but when I execute that command line MySQL start and stop. In the log, I can see just that: mysqld_multi log file version 2.2; run: Wed Apr 14 13:01:02 2004 Starting MySQL servers Starting mysqld daemon with databases from /home/benoit/mysql/var 040414 13:01:05 mysqld ended Why the server do not stay online? Thank you, Benoit Tremblay -- NerdzTeam [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi kills socket from previous Daemon
Hello all, I would like to run diverent MySQL-Daemons on the same Linux machine, so I use mysqld_multi to start the different processes. The Config looks right to me, I have different Database Directorys, Pid-Files, Ports, IDs usw. and different Socket-Files and all over it seems to work. But! as soon as I start the sekond Daemon my Socket-'File' from the first one, who ist started at the boot time (like RedHat Config), disappears! Both Daemons are running still fine, but the first one without a Socket. I have to connect over the TCP Port. The same happens if i stop the first Daemon and then start it with mysqld_multi. The Socket is here, untill I start the next Daemon with mysqld_multi. Has anybody a Idee where I can look and find a way to keep my Sockets ??? Before I say good by, I would like to apologies about the bat sentens construction and the writing mistakes in English! Best regards, Tobias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi
I am trying to execute mysqld_multi script in unix. But it's giving me following error "WARNING! my_print_defaults command not found. Please make sure you have this command available and in your path. The command is available from the latest MySQL distribution." I have the laterst MySQL distribution installed on my machine. If anyone seen this error before, please let me know the fix. Thanks Raza -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
What is the proper method of creating innodb/ibdata files with mysqld_multi?
Good morning: What is the proper method of creating ibdata files with mysqld_multi? Using mysqld_multi the second server started, but just created one ibdata file instead of four, which I have indicated in the second servers' my.cnf file located in its data dir. Also, I was unable to log on to the new mysql server and I was unable to stop the server. Any suggestions are welcome. Thanks in advance for any help. Respectfully, Michael - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
mysqld_multi
I try to set up multiple daemons on the same with different versions and I can’t get it working has anybody a example file so I can test if I can get it working. I have attached my file -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
What is going on mysqld_multi
Why does only the [mysqld2] start see attached file Does anybody have a my.cnf file for 3.23.58 since I can’t get it started with InnoDB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi
I have two different versions running 3.23 & 4.0 If I wanna configure the section [mysqld_multi] how can the machine automatic boot with two different mysqld since 3.23 uses safe_mysqld Mysqld= /usr/local/bin/mysqld_safe ( and not for 3.23 safe_mysqld) Mysqladmin = /usr/local/bin/mysqladmin
mysqld_multi - Cant find mysqld in my.cnf
Hi, I have an odd problem with mysqld_multi. I am trying to set up several MySQL servers on my new development server, for testing purposes. I currenty have only one, 4.0.9, just want to get this one going first. However, when I try to start mysqld_multi, it seems it does not recognise the mysqld=xxx option in the [mysqld40009] section of my my.cnf file. It simply complains it can't find a mysqld option! [bin] ./mysqld_multi --no-log start 40009 MySQL 4.0.9 is installed in: /usr/local/mysql/40009 Here is /etc/my.cnf: [mysqld40009] datadir=/usr/local/mysql/40009/data socket=/usr/local/mysql/40009/mysql.sock user=mysql basedir=/usr/local/mysql/40009 port=3306 log=log log-bin=binlog mysqld=/usr/local/mysql/40009/bin/mysqld_safe [mysqld_multi] I can only get it to work when the mysqld= part is in a [mysqld_multi] section, or on the command line. This is of course pointless, as I want each server to run its own version. My mysqld_multi is version 2.5, which according to the docs should be able to do this. This does work for example: [bin]./mysqld_multi --no-log --mysqld=/usr/bin/mysql/40009/bin/mysqld_safe - -mysqladmin=/usr/bin/mysql/40009/bin/mysqladmin start 40009 Any ideas? Mant thanks, Mark - Windows, Linux and Internet Development Consultant Email: [EMAIL PROTECTED] Web: http://www.scriptsmiths.co.za - -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi don't starts groups on Linux RedHat 9
Hello, mysqld_multi doesn't start the two groups if I gave this command imediately after stopping them. Thanks Anticipated, Iulian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi don't starts groups on Linux RedHat 9
Hello, mysqld_multi doesn't start the two groups from my.cnf if I give the start command immediately after stopping them. How can I safely start the groups with mysqld_multi anytime (including immediately after stopping them)? Thanks Anticipated, Iulian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi don't starts groups on Linux RedHat 9
Hello, mysqld_multi doesn't start the two groups if I gave this command imediately after stopping them. It will start only one group. I'm working on Linux RedHat 9 MySQL 4.0.14. How can I solve this problem, please? Thanks Anticipated, Iulian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi on Linux RedHat 9
Hello, mysqld_multi doesn't start the two groups if I gave this command imediately after stopping them. Thanks Anticipated, Iulian . -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Any Issues with 3.23.56 and 4.0.13 using mysqld_multi on one server
Is it possible to run 3.23.43 and 4.0.13 on the same server? I don't see anything in the documentation that should prohibit this as long as the installations are in different directories, use different sockets/ports and data directories. Can this be done utilizing mysqld_multi and if so are there any special considerations? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqld_multi fails on Solaris 8
Hello, Has anyone had success using the mysqld_multi startup script at boot on Solaris 8? I can start mysqld manually, but not automatically at boot time. Any help or advice is apprciated. Thanks a lot, Matt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqld_multi
On Thu, 7 Nov 2002, Chris Raymer wrote: > Yes, that is what I meant. Thank you for the clarification and response. > Any ideas on maximizing *server* performance besides the usual db-specific > optimizations like indexing? If not too much trouble, could you give me a > brief explanation why I would not see a performance boost if running > separate servers on the same box? My thoughts, if have one MySQL server > running on one box with 10 databases, and 1 or 2 of those databases are > getting the majority of the requests and tying up the processes, seems like > the other 8 would suffer. Hi! You can think of server instances as you'd think of databases. If one server instance (say, that with one or two heavily-loaded databases) gets a lot of requests, the other server instances suffer. With separate server instances you'll suffer from additional overhead. If you require different server configuration for different databases, then you'll have to install two or more separate server instances. Hope this clears it. :-) Regards, Iikka ** * Iikka Meriläinen * * E-mail: [EMAIL PROTECTED] * * Vaala, Finland * ** - 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: mysqld_multi
Yes, that is what I meant. Thank you for the clarification and response. Any ideas on maximizing *server* performance besides the usual db-specific optimizations like indexing? If not too much trouble, could you give me a brief explanation why I would not see a performance boost if running separate servers on the same box? My thoughts, if have one MySQL server running on one box with 10 databases, and 1 or 2 of those databases are getting the majority of the requests and tying up the processes, seems like the other 8 would suffer. - Original Message - From: "Iikka Meriläinen" <[EMAIL PROTECTED]> To: "Paul DuBois" <[EMAIL PROTECTED]> Cc: "Raymer, Chris" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 12:42 AM Subject: Re: mysqld_multi On Wed, 6 Nov 2002, Paul DuBois wrote: > At 13:22 -0600 11/6/02, Raymer, Chris wrote: > >Any opinions on running mysqld_multi? Our architecture, X-serve, > >2GBs RAM,Dual Procs, 480 GB stogage as "Master" MySQL server > >replicated to a less impressive server. Seems logical to separate > >the "heavy-hitter" dbs to their own "servers" and take more > >advantage of the server's resources. > > What's this got to do with mysqld_multi, which is used for running > multiple servers on the *same* machine? Hi! Maybe Mr. Raymer means that he would get more performance when running multiple _MySQL_ servers (i.e. instances) on a same _physical_ server (i.e. box). Getting more performance this way is unfortunately a false assumption, though. More stability, perhaps, but not performance. Iikka ** * Iikka Meriläinen * * E-mail: [EMAIL PROTECTED] * * Vaala, Finland * ** - 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: mysqld_multi
On Wed, 6 Nov 2002, Paul DuBois wrote: > At 13:22 -0600 11/6/02, Raymer, Chris wrote: > >Any opinions on running mysqld_multi? Our architecture, X-serve, > >2GBs RAM,Dual Procs, 480 GB stogage as "Master" MySQL server > >replicated to a less impressive server. Seems logical to separate > >the "heavy-hitter" dbs to their own "servers" and take more > >advantage of the server's resources. > > What's this got to do with mysqld_multi, which is used for running > multiple servers on the *same* machine? Hi! Maybe Mr. Raymer means that he would get more performance when running multiple _MySQL_ servers (i.e. instances) on a same _physical_ server (i.e. box). Getting more performance this way is unfortunately a false assumption, though. More stability, perhaps, but not performance. Iikka ** * Iikka Meriläinen * * E-mail: [EMAIL PROTECTED] * * Vaala, Finland * ** - 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: mysqld_multi
At 13:22 -0600 11/6/02, Raymer, Chris wrote: Any opinions on running mysqld_multi? Our architecture, X-serve, 2GBs RAM,Dual Procs, 480 GB stogage as "Master" MySQL server replicated to a less impressive server. Seems logical to separate the "heavy-hitter" dbs to their own "servers" and take more advantage of the server's resources. What's this got to do with mysqld_multi, which is used for running multiple servers on the *same* machine? Chris - 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
mysqld_multi
Any opinions on running mysqld_multi? Our architecture, X-serve, 2GBs RAM,Dual Procs, 480 GB stogage as "Master" MySQL server replicated to a less impressive server. Seems logical to separate the "heavy-hitter" dbs to their own "servers" and take more advantage of the server's resources. Chris - 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
mysqld_multi
How much CPU per mysqld_multi user would be needed? I work for an ISP and would like to give 100 users a mysqld each How do a calculate the CPU's I would need? Thanks Simon Hoping to give MySQL to all? - 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
FW: Multiple Servers, mysqld_multi
> sql,query > Is there any option to do this on a windows version? > All the documentation ( and from what I see of the > installation of the = > windows version ) leads me to believe there is not > > Luc > > - 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
using mysqld_multi to start multiple versions of MySQL
Hi, I am running MySQL-3.22.32 and MySQL-3.23.47 on Solaris 8. In reading through your documentation for 3.23.47, I noticed that in section "4.1.4 Running Multiple MySQL Servers on the Same Machine" it is written: "If you want to run multiple servers, the easiest way is to compile the servers with different TCP/IP ports and socket files so they are not both listening to the same TCP/IP port or socket file. See section 4.7.3 mysqld_multi, program for managing multiple MySQL servers." This leads me to believe that I can use mysqld_multi to start instances of both 3.22.32 and 3.23.47. However, as far as I can tell, mysqld_multi is actually only useful for starting multiple instances of one version of MySQL since there seems to be know way to specify a different version of safe_mysqld or mysqladmin for different mysqld groups. I would really like to be able to use mysqld_multi to start/stop both multiple instances of 3.23.47 and instances of 3.22.32 since I am in a situation where MySQL will get upgraded for different applications at different times and I will definitely be running multiple versions of MySQL most of the time. I like the idea of being able to go to one place to start/stop different servers. Especially since I will not be the only person who has to take care of this part. Am I able to get this functionality out of mysqld_multi, and if so, how do I set that up? If not, would upgrading to 4.x help me? Thanks, Robin McMillon [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