如您需要技术咨询、解决方案定制、故障排除、运维监控等服务,可联系ericwcn#at#163.com。

Cloudstack4.4管理节点初始化数据库报错:ERROR 1046 (3D000) at line 285: No database selected

云计算 立杰 969℃ 0评论

安装管理节点,初始化数据库配置时报错,经过查询是已修复的BUG,可通过修改初始化数据库脚本,在表名前加上数据库名`cloud`即可修复。
vim /usr/share/cloudstack-management/setup/create-schema-premium.sql
分别修改病添加 `cloud`.
line 299
`cloud`.`netapp_pool` (`id`) ON DELETE CASCADE
line318
`cloud`.`netapp_volume` (`id`)

原文链接:https://github.com/apache/cloudstack/commit/c368d3b6eeb41efe508bb0d3e0abe3a4ca5bb8e2

root@csm:~/CloudStack# cloudstack-setup-databases cloud:cloud@localhost –deploy-as=root:root
Mysql user name:cloud [ OK ]
Mysql user password:****** [ OK ]
Mysql server ip:localhost [ OK ]
Mysql server port:3306 [ OK ]
Mysql root user name:root [ OK ]
Mysql root user password:****** [ OK ]
Checking Cloud database files … [ OK ]
Checking local machine hostname … [ OK ]
Checking SELinux setup … [ OK ]
Detected local IP address as 192.168.122.49, will use as cluster management server node IP[ OK ]
Preparing /etc/cloudstack/management/db.properties [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database-premium.sql [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema-premium.sql

We apologize for below error:
***************************************************************
Encountering an error when executing mysql script
———————————————————————-
table:
/usr/share/cloudstack-management/setup/create-schema-premium.sql

Error:
ERROR 1046 (3D000) at line 285: No database selected

Sql parameters:
{‘passwd’: ‘root’, ‘host’: ‘localhost’, ‘user’: ‘root’, ‘port’: 3306}
———————————————————————-

***************************************************************
Please run:

cloud-setup-database -h

for full help

转载请注明:知识库 » Cloudstack4.4管理节点初始化数据库报错:ERROR 1046 (3D000) at line 285: No database selected

喜欢 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址