Menu Close

Category: mysqld_multi

Installing MySQL 5.5 Part 2 – Multiple instances with mysqld_multi

Continuing our  previous post, today we’ll go up several instances of MySQL on the same server, very common practice today, instead of creating a single instance in100% of the resources of the server splits the load of QPS (queries per seconds) between multiple instances. The groups will look for mysqld_multi [mysqldN] within our my.cnf configuration file, where N is an integer that will be used later to refer to what server we’ll see the STOP or START REPORT We have the following structure on our server: | _3306 / | _data / | _logs / Let’s create the structure of the 3307 instance and set her rights: mkdir 3307 mkdir 3307/data mkdir 3307/logs chown-R mysql: mysql / mysql/3307 We will now create the default structure of the script contained in the database foldermysql cd / mysql / mysql / scripts / . / mysql_install_db – user = mysql – basedir = / mysql / mysql – datadir = /mysql/3307/data / Recalling that we must be careful to get the OK’s 2 below: Installing MySQL system tables … OK Filling help tables … OK That done, we go to our configuration file, the my.cnf, today it looks like this: [mysqld] datadir = / mysql/3306/data socket = / mysql/3306/mysql.sock user = mysql [mysqld_safe] log-error = / mysql/3306/logs/mysqld.log pid-file = / mysql/3306/mysqld.pid Now let’s add a new group, called [mysqld_multi] it will put three items: mysqld – path to our binary mysql, I suggest here, put the path to . . .

Liked? Help and Share!