问题:
全新安装 mariadb 10.4 后,无法使用 ansible 设置 root 密码。
当通过 mariadb(不是官方的 debian 包)从 debian 包安装 mariadb 时,密码root
为空,可以从 localhost 进行无密码登录。
尽管如此,ansible还是mysql_user
抛出了以下错误:
failed: [XXX] (item=localhost) => {"ansible_loop_var": "item", "changed": false, "item": "localhost", "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}