Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

初始化数据库表结构和数据的时候有出现这个错误么 #57

Closed
Gotric opened this issue Aug 23, 2016 · 3 comments
Closed

Comments

@Gotric
Copy link

Gotric commented Aug 23, 2016

/# python cobra.py install
Start create database structure...
MySQL database error: (_mysql_exceptions.OperationalError) (2003, "Can't connect to MySQL server on '127.0.0.1' (111)")
FAQ: https://github.com/wufeifei/cobra/wiki/Error#mysql

@FeeiCN
Copy link
Owner

FeeiCN commented Aug 23, 2016

config文件配置错误

@FeeiCN FeeiCN closed this as completed Aug 23, 2016
@Gotric
Copy link
Author

Gotric commented Aug 24, 2016

这个配置正确么:

[cobra]

配置Cobra运行的域名,没有则无需配置

#domain: cobra.wufeifei.com

配置Host

配置为0.0.0.0, 则可以外网访问

配置为127.0.0.1 则只有本机能访问

host: 127.0.0.1

配置访问默认

默认为80

port: 5000

是否开启Debug模式

debug: 0

日志目录

logs_directory: logs

加密Key(设置为32位md5值)

secret_key: 21232f297a57a5a743894a0e4a801fc3

[upload]

被扫描代码的存放位置

不需要 \ /符号

directory: /tmp/cobra

支持上传的后缀

extensions: tar.bz2|tar|gz|tgz|tar.gz|rar|zip

最大上传大小(单位M)

max_size: 200

数据库配置

[database]
mysql: mysql+mysqldb://root:toor@127.0.0.1:3306/cobra

SVN账号配置

[svn]
username:
password:

Git账号配置

[git]
username:
password:

@FeeiCN
Copy link
Owner

FeeiCN commented Aug 24, 2016

[database]
mysql: mysql+mysqldb://root:toor@127.0.0.1:3306/cobra

看着没有问题,你可以尝试mysql -uroot -p访问下

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants