beego / admin

基于beego的后台管理系统
801 stars 321 forks source link

<orm.RegisterModel> table name `` repeat register, must be unique #10

Open milliyang opened 10 years ago

milliyang commented 10 years ago

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:

table name `` repeat register, must be unique
ywqwancbx commented 10 years ago

you must create database . https://github.com/astaxie/beego/blob/master/orm/models_boot.go row 34~37. good luck!

ywqwancbx commented 10 years ago

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...

Dannyoung commented 7 years ago

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:

table name `` repeat register, must be unique @ywqwancbx what's the mean about "You must create database?"
hehexiaoxia commented 7 years ago

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.

drone789 commented 6 years ago

edit the app.confg. db_host = localhost -> db_host = 127.0.0.1