DB部署在了机器A上 ,用机器B访问A中新建的数据库image时出现了以下问题:
[06:40:20 E ] MySQL: [MySQL]: [Comment]: << text [mysql_error]: Access denied for user 'root'@'%' to database 'image' [mysql_errno]: 1044 [mysql_sqlstate]: 42000[src/plugin.cpp:39]
在B机器上用mysql -uroot -p -h A的ip登录A的mysql ,show databases; 发现没有image这个数据库。
原因是A中的数据库未对外授权,登录A机器,
运行 grant all on image.* to root@'%' identified by 'password';就可以访问了。