我已经下载了最新版本(3.30)的puppetlabs-mysql 模块,但我无法定义 root 密码。我的操作系统是 Ubuntu 14.04.2 LTS
当我尝试运行时:
class {'::mysql::server':
remove_default_accounts => true,
create_root_user => true,
create_root_my_cnf => true,
root_password => $mysql_server_root_password,
}
我收到以下消息:
Notice: Compiled catalog for joseguilherme-virtualbox in environment production in 0.53 seconds
Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}790c6c49aed83ee9b81fa3c7360898c8'
Notice: /Stage[main]/Mysql::Server::Service/File[/var/log/mysql/error.log]/group: group changed 'adm' to 'mysql'
Error: Could not prefetch mysql_user provider 'mysql': Execution of '/usr/bin/mysql -NBe SELECT CONCAT(User, '@',Host) AS User FROM mysql.user' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Error: Execution of '/usr/bin/mysql -e CREATE USER 'root'@'localhost' IDENTIFIED BY PASSWORD '*0646FA81148FBF3DB9D94E1F0FF3DDF1407A6A68'' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Error: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]/ensure: change from absent to present failed: Execution of '/usr/bin/mysql -e CREATE USER 'root'@'localhost' IDENTIFIED BY PASSWORD '*0646FA81148FBF3DB9D94E1F0FF3DDF1407A6A68'' returned 1: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Puppet 可以正常安装 mysql-server 但尝试定义 root 密码时失败。此外,不会创建 /root/.my.cnf 文件。我该如何解决这个问题?
感谢你的帮助!