Bug #89557 use the new performance_schema tables for a better configuration file detection
Submitted: 6 Feb 2018 15:38 Modified: 13 Feb 2018 7:01
Reporter: Frederic Descamps Email Updates:
Status: Verified Impact on me:
None 
Category:Shell AdminAPI InnoDB Cluster / ReplicaSet Severity:S4 (Feature request)
Version:8.0.4-rc OS:Any
Assigned to: CPU Architecture:Any

[6 Feb 2018 15:38] Frederic Descamps
Description:
feature request:

When using mysql-shell and trying to configure the instance, if there is a file /etc/my.cnf present on the filesystem, the shell proposes to use that file when we use configureLocalInstance()

In my case I would like to use different instances (not instances created from the shell), I use dbdeployer, that run on the same machine and have their config file(s) somewhere else on the filesystem.

I tink that using the table variables_info from pfs would provide a better choice  to try to find the file to modify (as proposition of course, and let pple decide to use it or not). (check http://lefred.be/content/where-does-my-mysql-configuration-variable-value-come-from/)

Example:

MySQL  127.0.0.1:24406   JS  dba.configureLocalInstance('root@127.0.0.1:24406')
Please provide the password for 'root@127.0.0.1:24406': ********

Detecting the configuration file...
Found configuration file at standard location: /etc/my.cnf
Do you want to modify this file? [Y|n]:  [Y|n]: 

but that /etc/my.cnf is not used at all:

 MySQL  127.0.0.1:24406   SQL  select DISTINCT VARIABLE_PATH from performance_schema.variables_info;
+-----------------------------------------------------------+
| VARIABLE_PATH                                             |
+-----------------------------------------------------------+
|                                                           |
| /home/fred/sandboxes/multi_msb_8_0_4/node1/my.sandbox.cnf |
+-----------------------------------------------------------+

On the example above, instead of proposing to modify /etc/my.cnf, I would prefer that /home/fred/sandboxes/multi_msb_8_0_4/node1/my.sandbox.cnf would be advised.

Thank you.

How to repeat:
Just try to create a cluster on a mysql instance not using /etc/my.cnf at all but having that file on the filesystem anyway. (or use dbdeployer or mysql-sandbox to try)
[7 Feb 2018 4:52] Alfredo Kojima
That could simplify the process a bunch indeed, but OTOH if it's only available in MySQL 8 it wouldn't help  much, since we can use SET PERSIST instead and ignore my.cnf
[7 Feb 2018 6:04] Frederic Descamps
You are right ! ;-)

I think mysql-shell-8.0.X should then use this way of configuring the servers and 1.0.X the current way.

Thanks
[13 Feb 2018 7:01] MySQL Verification Team
Hello Frederic,

Thank you for the report and feature request!

Thanks,
Umesh