I'm in real trouble here. First, thank you to all of you that will take the time to read my post.
So, I've followed tones and tone of tutorial to create multiple MySQL instances. On the paper, it's not complicated. I've followed this tutorial (in french, sorry, but it's not complicated to understand) http://www.bocciolesi.fr/tutoriels-et-cours/installer-plusieurs-instances-de-mysql/
I've created a separated my.cnf that I've named multi_my.cnf. Here is the content :
[mysqld_multi] mysqld = /usr/bin/mysqld_safe mysqladmin = /usr/bin/mysqladmin user = multi_admin password = multi_admin log = /var/log/mysqld_multi.log [mysqld2] socket = /tmp/mysql.sock2 port = 3307 pid-file = /var/lib/mysql2/hostname.pid1 datadir = /var/lib/mysql2 #language = /usr/share/mysql-8.0/mysql/french user = cube
Of course, I did a copy of the /var/lib/mysql folder to /var/lib/mysql2 and managed the permissions. In this side, I think everything is good. Also, my multi_admin user is configured.
But, when I run the command :
mysqld_multi -–defaults-file=/etc/mysql/multi_my.cnf start
And then, the command :
mysqld_multi -–defaults-file=/etc/mysql/multi_my.cnf report
I end up having :
Reporting MySQL servers MySQL server from group: mysqld2 is not running
The same thing happens when I try to put the content of multi_my.cnf on the my.cnf file.
Here is the content of /var/log/mysqld_multi.log :
mysqld_multi log file version 2.16; run: lun. sept. 24 11:53:56 2018 Starting MySQL servers 2018-09-24T09:53:56.129051Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2018-09-24T09:53:56.140844Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2018-09-24T09:53:56.389354Z mysqld_safe mysqld from pid file /var/lib/mysql2/hostname.pid2 ended mysqld_multi log file version 2.16; run: lun. sept. 24 11:53:58 2018 Reporting MySQL servers MySQL server from group: mysqld2 is not running
The thing that brings my attention here is that in the log, we can see that the daemon tries to use the databases from /var/lib/mysql. Shouldn't it be /var/lib/mysql2 ?
Any explanation would be much appreciated ! Thank you.