我使用以下 ansible 任务将所有权限授予所有数据库.
I used following ansible task to GRANT ALL privilege to all databases.
- name: create new user {{ db_user }} with all privilege
mysql_user: name="{{ db_user }}"
password="{{ db_password }}"
append_privs=yes
priv=*.*:ALL,GRANT state=present
但是当我在 mysql(mariadb) 上运行 show grants for 'dbuser'@'XX.XX.XX.XX'; 它显示我跟随.
but when I run show grants for 'dbuser'@'XX.XX.XX.XX'; on mysql(mariadb) it shows me following.
GRANT USAGE ON *.* TO 'dbuser'@'XX.XX.XX.XX' IDENTIFIED BY PASSWORD '*A7AD1ECBCD787B8CABE6A58AEA652A8B3CF5035BA82'
如何使用 ansible 将此 USAGE 更改为 GRANT ALL?
How to change this USAGE to GRANT ALL using ansible?
默认情况下 mysql_user 使用 localhost 主机部分创建用户.
因此,您的任务使用 GRANT ALL 创建了 dbuser@localhost.
如果您需要其他主机,请为模块设置 host=XX.XX.XX.XX 参数.
从 2.1 开始修改权限时也有 host_all=yes 可用.
By default mysql_user creates users with localhost host portion.
So your task created dbuser@localhost with GRANT ALL.
If you need another host, set host=XX.XX.XX.XX parameter for the module.
Also there is host_all=yes available since 2.1 when modifying permissions.
这篇关于Ansible 不会将权限从 USAGE 更改为 GRANT ALL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为