Reputation: 299
As I know to execute any mysql functions from salt master, we need to install mysql python package on mysql minion. So I installed it on minion as follows. sudo apt-get install phython-mysqldb
After that I edited /etc/salt/minion file to add the following at the end of the file
mysql.host: ‘localhost’ mysql.port: 3306 mysql.user: ‘root’ mysql.pass: ‘’ mysql.db: ‘mysql’ mysql.charset: ‘utf8′
Then I restarted the minion,
sudo service salt-minion restart
Now, from salt master if I run any command, it's not receiving the response from the minion. When I remove that added line from /etc/salt/minion file, it receives response output from the minion. What's wrong am I doing here?
Upvotes: 2
Views: 1114
Reputation: 547
Salt uses it's own version of python so if you try to install package using pip install it wont find the package.
Here is what worked for me
salt pip install pymysql
Upvotes: 1
Reputation: 5932
Your settings are slightly mis-formatted. There might be an issue with the quotes.
I tried these and it works for me.
mysql.host: 'localhost'
mysql.port: 3306
mysql.user: 'root'
mysql.pass: ''
mysql.db: 'mysql'
mysql.charset: 'utf8'
Please note that these are the default settings anyway, no need to add them as long as you don't change i.e. the password.
Upvotes: 0