2014.7.0 新版功能.
depends: |
|
---|---|
configuration: | See |
The mysql_query module is used to execute queries on MySQL databases. Its output may be stored in a file or in a grain.
query_id:
mysql_query.run
- database: my_database
- query: "SELECT * FROM table;"
- output: "/tmp/query_id.txt"
salt.states.mysql_query.
run
(name, database, query, output=None, grain=None, key=None, overwrite=True, **connection_args)¶Execute an arbitrary query on the specified database