Open milliyang opened 10 years ago
you must create database . https://github.com/astaxie/beego/blob/master/orm/models_boot.go row 34~37. good luck!
sorry ! I forgot to tell u .first copy admin->app.conf to hello->app.conf
important:
rbac_role_table = role
rbac_node_table = node
rbac_group_table = group
rbac_user_table = user
create tables configuration...
I have create the database,and edit the conf as you had written upstairs. And I change the function "Connection" to this: func Connection() { orm.RegisterDataBase("default", "mysql", "root:bzywet#@tcp(127.0.0.1:3306)/testdb?charset=utf8") }
it turn out error:
please check database config in app.conf ,make sure the db is that you has created. and make sure your conf/app.conf in your execute file directory.
edit the app.confg. db_host = localhost -> db_host = 127.0.0.1
i did all the command in ReadMe.
1, bee new hello 2, cd hello 3, update conf 4, cp -R ../github.com/beego/admin/static ./ 5, p -R ../github.com/beego/admin/views ./ 6, go build 7, ./hello
it turn out error: