尝试安装默认示例应用时出现此错误。 我运行osx lion,32位php 5.3.5(mamp) 怎么解决这个问题?
Do you wish to syncronize the database with the application now? [Y/n]y
melt>db sync
DROP TABLE `core__metadata`
Melt Framework - Exception Caught
__Path: /core/console/cmd_sync
__File: /Users/gustav/Documents/MAMP_ROOT/melt/core/modules/db/api.php; line #143
__Messsage: E_USER_ERROR caught: The mySQLi connection could not be established.
__Stack:
#12 ~Internal Location~ (N/A)
#11 api.php (188) trigger_error("The mySQLi connection could not be established. ", 256)
#10 api.php (143) melt\db\get_link()
#9 melt.model.php (1714) melt\db\run("DROP TABLE `core__metadata`")
#8 console_controller.php (481) syncronizeAllModels()
#7 ~Internal Location~ (N/A) cmd_sync()
#6 melt.controller.php (325) call_user_func_array(Array, Array)
#5 melt.controller.php (278) internalInvoke([Instance of 'melt\core\InvokeData'], false, true)
#4 melt.routing.php (146) invokeFromExternalRequest(Array, [Instance of 'Closure'])
#3 ~Internal Location~ (N/A) melt\internal\{closure}()
#2 melt.routing.php (157) call_user_func([Instance of 'Closure'])
#1 core.php (15) require("/Users/gustav/Documents/MAMP_ROOT/melt/core/melt.routing.php")
Error tag: #kEZONwCOMMIT
Installation script complete.
答案 0 :(得分:0)
可能不那么明显的一点是,Melt不会自动为您创建实际的数据库。
如果您确定已输入正确的数据库连接详细信息并仍然出现该错误,请确保已创建在配置中指定的数据库。
我们是aware of this issue,它将在下一个主要版本中修复。现在我们有updated the documentation警告,以便其他用户不会遇到同样的问题。感谢您报告此事并帮助我们让Melt变得更好。
答案 1 :(得分:0)
也有这个问题。 如果登录名和密码正确,请确保创建名为“melt”的架构(这是默认设置)。 Melt不会为您创建架构。
答案 2 :(得分:0)
如果在检查数据库设置(用户名,密码,端口等)后仍然收到此错误消息,请确保您之前已创建了在融合配置中指定的数据库。
我认为在任何地方(快速入门)都没有提到你必须在执行安装之前创建要使用的数据库。这个错误发生在我身上,经过大约一个小时的试验/错误后我注意到数据库甚至没有创建,并且没有报告CREATE DATABASE错误(或类似),所以我检查了我的数据库,看到没有数据库。所以我创建了一个名为' melt '的数据库(这是默认名称,您可以在安装过程中指定它)我刚刚再次运行命令db sync
(您也可以运行{{ 1}}再次完成整个过程)并且它有效!
总结:
install
之前,在mysql服务器上创建数据库。install
命令。如果这不能解决您的问题,请继续关注!和合