Sponsored Content
Special Forums UNIX and Linux Applications Configuring mysql for multiple instance only Post 302938304 by jcdole on Saturday 14th of March 2015 04:48:19 AM
Old 03-14-2015
Configuring mysql for multiple instance only

Hello.
I plan to use mysql with only instance database so I can stop one database for maintenance without stopping every thing.

When one reads through the my.cnf config file, it is not clear if we must use at the same time a single database mysql plus any instances mysqld2 (for app1), mysqld3 (for app2), and so on.

Or may I get rid of the mysqld process and start only mysqld2, mysqld3, ....
I have try that but could not start any instance. Of course I have configured a systemd service file.

Or may I use mysqld1 as mysql database pointing to mysql as first mandatory database and then add more instance when necessary.

here code for mysqld@.service
Code:
[Unit]
Description=MySQL Multi Server for instance %i
After=syslog.target
After=network.target

[Service]
User=mysql
Group=mysql
Type=forking
ExecStart=/usr/bin/mysqld_multi --defaults-file=/etc/mysql/cfg_%i.cnf  --log=/var/log/mysql/mysql_multi.log --verbose  start %i
ExecStop=/usr/bin/mysqld_multi --log=/var/log/mysql/mysql_multi.log  stop %i
#Restart=always
#RestartSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target

my config file in /etc/my.cnf
Code:
[client]
port       = 3306
socket     = /bdd/bd_1/sock/mysql_cli.sock

[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log        = /var/log/mysqld_multi.log

[mysqld2]
port       = 63332
datadir    = /bdd/bd_2/app2
pid-file   = /bdd/bd_2/app2/mysqld.pid
socket     = /bdd/bd_2/app2/mysql.sock
user       = mysql

[mysqld3]
port       = 63333
datadir    = /bdd/bd_3/app3
pid-file   = /bdd/bd_2/app3/mysqld.pid
socket     = /bdd/bd_2/app3/mysql.sock
user       = mysql

!includedir /etc/my.cnf.d

I would like some advise.

Any help is welcome.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple PHP sessions within the same browser instance

Dear all..... I am currently writing a Help-Desk / Knowledge Base application using PHP/PostGreSQL. I authenticate the user using a quite elaborate mechanism of cookies. The problem is that using cookies (I also have a version using sessions with the same problem), I can only seem to get one... (4 Replies)
Discussion started by: zazzybob
4 Replies

2. UNIX for Dummies Questions & Answers

Multiple instance of same process

;)Hi Everyone, I am using solaris 5.10. I have a java process running in server mode in unix. The problem is that it automatically forks i.e creates a child process. I mean suddenly two instances of that process start running , in which the process-id of first instance is the parent... (0 Replies)
Discussion started by: glamo_2312
0 Replies

3. UNIX for Advanced & Expert Users

Multiple Instance Of Same Process

Hi Everyone, I am using solaris 5.10. I have a java process running in server mode in unix. The problem is that it automatically forks i.e creates a child process. I mean suddenly two instances of that process start running , in which the process-id of first instance is the parent... (5 Replies)
Discussion started by: glamo_2312
5 Replies

4. Shell Programming and Scripting

Help with multiple instance script checking

I am trying to debug the following script. It appears that when the check for script running occurs, it's finding the actual grep statement and causing the script believe the script is already running. This is deployed on two different servers where one works fine, the other doesn't. Any ideas? ... (2 Replies)
Discussion started by: DaddyMoose
2 Replies

5. UNIX for Advanced & Expert Users

Multiple Instance of Unix Shell Script

Hi All, I have a problem mentioned below. I have a script which performs line by line operations on several files. I have a temp_file storing the list of names of the file to be validated. Right not in while loop i validate these files one by one. Is there anyway that i can modify... (1 Reply)
Discussion started by: amitaryans
1 Replies

6. Shell Programming and Scripting

A script that spawns multiple instance of itself.

Hi all,I have some questions of forking new process,the code is below.Any help will be appreciated. 1 #! /bin/bash 2 3 PIDS=$(pidof sh $0) 4 P_array=( $PIDS ) 5 echo $PIDS 6 let "instances = ${#P_array}-1" 7 8 echo "$instances instance(s)" of this script running." 9... (4 Replies)
Discussion started by: homeboy
4 Replies

7. Shell Programming and Scripting

Multiple instance in tomcat

I need to install a tomcat6 with multiple instances like instance1,instance2 and instance3 in a server. I came to know that for that we need to install tomcat6,apache2.0,mod_jk1.2 and jre with tools.jar installed.And we need to create multiple instances with same web.xml and difference... (0 Replies)
Discussion started by: tuxslonik
0 Replies

8. Shell Programming and Scripting

No lock file: Preventing multiple instance of a script

I've been bitten by using a lock or pid file to prevent multiple instances of a script. A user typed kill -9, and the pid file didn't go away. You can't trap -9. So when he tried to restart, it said "already running", and I got trouble report. Argh. So here's what we came up with: # Stop if... (1 Reply)
Discussion started by: McFadden586
1 Replies

9. AIX

Configuring MySQL problem

Hi, Trying to setup mediawiki on a system but having problems configuring mysql: CC=/usr/bin ./configure checking build system type... powerpc-ibm-aix6.1.0.0 checking host system type... powerpc-ibm-aix6.1.0.0 checking target system type... powerpc-ibm-aix6.1.0.0 checking for a... (9 Replies)
Discussion started by: vpundit
9 Replies

10. Red Hat

configuring MYsql db on redhat cluster

Hello, can someone please suggest me in configuring the mysql db on redhat cluster, I have few questions. 1. where do I have to configure heart beat links, and is there any file in the redhat cluster that we update it to use these ipaddress and these interface on the node. 2. I am configuring... (0 Replies)
Discussion started by: bobby320
0 Replies
PMDAMYSQL(1)						       Performance Co-Pilot						      PMDAMYSQL(1)

NAME
pmdamysql - MySQL database PMDA DESCRIPTION
pmdamysql is a Performance Co-Pilot PMDA which extracts live performance data from a running MySQL database. INSTALLATION
pmdamysql uses a configuration file from (in this order): o /etc/pcpdbi.conf o $PCP_PMDAS_DIR/mysql/mysql.conf This file can contain overridden values (Perl code) for the settings listed at the start of pmdamysql.pl, namely: o database name (see DBI(3) for details) o database user name o database pass word Once this is setup, you can access the names and values for the mysql performance metrics by doing the following as root: # cd $PCP_PMDAS_DIR/mysql # ./Install If you want to undo the installation, do the following as root: # cd $PCP_PMDAS_DIR/mysql # ./Remove pmdamysql is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed. Binary Status values in text Some of the status values are in the form of YES/NO or ON/OFF. Since these cannot be intepreted by tools like PMIE, they have been duplicated with a _num extension and the values of 1 (YES/ON) or 0 (NO/OFF). Eg: o mysql.slave_status.slave_io_running o mysql.slave_status.slave_io_running_num FILES
/etc/pcpdbi.conf configuration file for all PCP database monitors $PCP_PMDAS_DIR/mysql/mysql.conf configuration file for pmdamysql $PCP_PMDAS_DIR/mysql/Install installation script for the pmdamysql agent $PCP_PMDAS_DIR/mysql/Remove undo installation script for the pmdamysql agent $PCP_LOG_DIR/pmcd/mysql.log default log file for error messages from pmdamysql SEE ALSO
pmcd(1), pmdadbping.pl(1) and DBI(3). # vi: sw=4 ts=4 et: 3.8.10 Performance Co-Pilot PMDAMYSQL(1)
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy