{"action":"created","issue":{"url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/1","labels_url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/1/comments","events_url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/1/events","html_url":"https://github.com/xiaoluoge11/lmanager/issues/1","id":107841631,"number":1,"title":"初始化数据失败","user":{"login":"cloudbps","id":6198106,"avatar_url":"https://avatars.githubusercontent.com/u/6198106?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudbps","html_url":"https://github.com/cloudbps","followers_url":"https://api.github.com/users/cloudbps/followers","following_url":"https://api.github.com/users/cloudbps/following{/other_user}","gists_url":"https://api.github.com/users/cloudbps/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudbps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudbps/subscriptions","organizations_url":"https://api.github.com/users/cloudbps/orgs","repos_url":"https://api.github.com/users/cloudbps/repos","events_url":"https://api.github.com/users/cloudbps/events{/privacy}","received_events_url":"https://api.github.com/users/cloudbps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-23T03:08:30Z","updated_at":"2015-09-23T03:56:47Z","closed_at":null,"body":"### 问题：\r\n-  通过manage.py初始化数据失败，下面是异常日志\r\n-  已经在mysql中授权本用户对cmdb数据库的所有访问权限 backend/config.ini\r\n\r\n```python\r\ncat config.ini \r\n[db]\r\ndb_host = localhost \r\ndb_port = 3306\r\ndb_user = cmdb\r\ndb_pass = redhat\r\ndb_name = cmdb\r\n```\r\n\r\n### 异常日志：\r\n- \r\n```python\r\n ./manage.py  syncdb\r\nSyncing...\r\nTraceback (most recent call last):\r\n  File \"./manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/usr/lib64/python2.6/site-packages/django/core/management/__init__.py\", line 399, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/usr/lib64/python2.6/site-packages/django/core/management/__init__.py\", line 392, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/usr/lib64/python2.6/site-packages/django/core/management/base.py\", line 242, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/usr/lib64/python2.6/site-packages/django/core/management/base.py\", line 285, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/usr/lib64/python2.6/site-packages/django/core/management/base.py\", line 415, in handle\r\n    return self.handle_noargs(**options)\r\n  File \"/usr/lib/python2.6/site-packages/south/management/commands/syncdb.py\", line 89, in handle_noargs\r\n    db.connection_init() \r\n  File \"/usr/lib/python2.6/site-packages/south/db/mysql.py\", line 183, in connection_init\r\n    cursor = self._get_connection().cursor()\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/__init__.py\", line 160, in cursor\r\n    cursor = self.make_debug_cursor(self._cursor())\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/__init__.py\", line 132, in _cursor\r\n    self.ensure_connection()\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/__init__.py\", line 127, in ensure_connection\r\n    self.connect()\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/utils.py\", line 99, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/__init__.py\", line 127, in ensure_connection\r\n    self.connect()\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/__init__.py\", line 115, in connect\r\n    self.connection = self.get_new_connection(conn_params)\r\n  File \"/usr/lib64/python2.6/site-packages/django/db/backends/mysql/base.py\", line 435, in get_new_connection\r\n    conn = Database.connect(**conn_params)\r\n  File \"/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py\", line 81, in Connect\r\n    return Connection(*args, **kwargs)\r\n  File \"/usr/lib64/python2.6/site-packages/MySQLdb/connections.py\", line 193, in __init__\r\n    super(Connection, self).__init__(*args, **kwargs2)\r\ndjango.db.utils.OperationalError: (1045, \"Access denied for user 'root'@'localhost' (using password: YES)\")\r\n```"},"comment":{"url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/comments/142484832","html_url":"https://github.com/xiaoluoge11/lmanager/issues/1#issuecomment-142484832","issue_url":"https://api.github.com/repos/xiaoluoge11/lmanager/issues/1","id":142484832,"user":{"login":"xiaoluoge11","id":13010155,"avatar_url":"https://avatars.githubusercontent.com/u/13010155?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaoluoge11","html_url":"https://github.com/xiaoluoge11","followers_url":"https://api.github.com/users/xiaoluoge11/followers","following_url":"https://api.github.com/users/xiaoluoge11/following{/other_user}","gists_url":"https://api.github.com/users/xiaoluoge11/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoluoge11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoluoge11/subscriptions","organizations_url":"https://api.github.com/users/xiaoluoge11/orgs","repos_url":"https://api.github.com/users/xiaoluoge11/repos","events_url":"https://api.github.com/users/xiaoluoge11/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoluoge11/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T03:56:47Z","updated_at":"2015-09-23T03:56:47Z","body":"您好，已经更新代码了，可以再去github上面下载最新版本\n\n\n\n\n\n\nAt 2015-09-23 11:24:50, \"Xin Liu\" <notifications@github.com> wrote:\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.'NAME': 'cmdb',                      # Or path to database file if using sqlite3.# The following settings are not used with sqlite3:'USER': 'cmdb',\n        'PASSWORD': 'redhat',\n        'HOST': 'localhost',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.'PORT': '3306',                      # Set to empty string for default.\n    }\n}\n\n\n这个地方应该引入config.ini的配置吧\n\n—\nReply to this email directly or view it on GitHub."}}