开发者

Melt install error

I get this error when trying to install the default sample app. I run osx lion, 32-bit php 5.3.5 (mamp) How can this be resolved?

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) invokeFromE开发者_如何学CxternalRequest(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.


If you keep getting this error message after checking your DB settings (username, password, port, etc) make sure you have previously created the database specified in the melt configuration.

I think it's not mentioned anywhere (in the quick start) that you have to create the database that your going to use before performing the install. This very same error happened to me, and after about an hour of trial/error i noticed that the database wasn't even created, and no CREATE DATABASE error (or similar) was reported, so i checked my db and saw there was no databases at all. So i created one database named 'melt' (this is the default name, you can specify it during the install process) i just ran the command db sync again (you can also run install to do the whole process again) and it worked!

So summarizing:

  • Create a database on your mysql server BEFORE performing the install of your melt framework.
  • Make sure you write the correct database_name, username, password, port (on MAMP the default mysql port is 8889 instead of 3306).
  • Re-run the install command.

If this doesn't solve your problem, keep looking! hehe


One thing that might not be so obvious is that Melt does not create the actual database automatically for you.

If you are certain that you have entered the correct database connection details and still get that error, make sure you have created the database you specified in the configuration.

We are aware of this issue and it will be fixed in the next major release. For now we have updated the documentation with a warning so that other users will not run into the same problem. Thank's for reporting this and helping us make Melt better.


Had this problem too. If the login and password are correct, make sure to create a schema called 'melt' (that's the default). Melt doesn't create the schema for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜