[MXS-3482] Add option file for maxctrl Created: 2021-04-06  Updated: 2021-05-26  Resolved: 2021-05-25

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl
Affects Version/s: None
Fix Version/s: 6.0.0

Type: New Feature Priority: Major
Reporter: Nilnandan Joshi Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None

Sprint: MXS-SPRINT-132

 Description   

Similar to the mysql command line client, MaxCtrl should have a file for options. This helps when the default administrative user is changed.



 Comments   
Comment by Johan Wikman [ 2021-05-19 ]

Hi niljoshi
Could you give a concrete example of what you have to do now, that such an options file would relieve you from? Just to make sure that I don't assume something you do not intend.

Comment by Nilnandan Joshi [ 2021-05-21 ]

Hi johan.wikman,

With MySQL, we can create .my.cnf file for storing client related settings including username and password so while connecting with mysql, we don't need to give user/pass in command line. Can we create the same kind of file with maxscale named .maxctrl.cnf or something? so we can store user/pass details in that file for maxctrl command line and can secure the password details?

Comment by Johan Wikman [ 2021-05-21 ]

niljoshiThanks, that made the intent quite clear!

Comment by Johan Wikman [ 2021-05-25 ]

Now at startup maxctrl looks for a file ~/.maxctrl.cnf and if found, it reads parameters values from the section [maxctrl] and uses those as defaults.

So, the following content would relieve you from typing the username and password.

[maxctrl]
user = <my-username>
password = <my-password>

Generated at Thu Feb 08 04:21:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.