使用 puppet 作为 Vagrant 提供程序和puppetlabs-mysql 模块(2.2.3) 我无法在具有 root 用户且没有密码的数据库上导入 sql 转储。
这是我正在使用的木偶代码:
class { '::mysql::server': }
mysql::db { 'foo':
user => 'root',
password => '',
host => 'localhost',
sql => '/vagrant/dump.sql',
}
这是盒子:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise
$ puppet --version
3.3.2
这是错误:
Error: Could not prefetch mysql_grant 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)