Guest User

Untitled

a guest
Apr 14th, 2018
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  2. DATABASE_NAME = 'Python' # Or path to database file if using sqlite3.
  3. DATABASE_USER = 'root' # Not used with sqlite3.
  4. DATABASE_PASSWORD = '' # Not used with sqlite3.
  5. DATABASE_HOST = 'localhost' # Set to empty string for localhost. Not used with sqlite3.
  6. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
  7.  
  8. Traceback (most recent call last):
  9. File "manage.py", line 11, in <module>
  10. execute_manager(settings)
  11. File "C:Python26libsite-packagesdjangocoremanagement__init__.py", line
  12. 362, in execute_manager
  13. utility.execute()
  14. File "C:Python26libsite-packagesdjangocoremanagement__init__.py", line
  15. 303, in execute
  16. self.fetch_command(subcommand).run_from_argv(self.argv)
  17. File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 195,
  18. in run_from_argv
  19. self.execute(*args, **options.__dict__)
  20. File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 221,
  21. in execute
  22. self.validate()
  23. File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 249,
  24. in validate
  25. num_errors = get_validation_errors(s, app)
  26. File "C:Python26libsite-packagesdjangocoremanagementvalidation.py", lin
  27. e 67, in get_validation_errors
  28. connection.validation.validate_field(e, opts, f)
  29. File "C:Python26libsite-packagesdjangodbbackendsmysqlvalidation.py", l
  30. ine 15, in validate_field
  31. db_version = connection.get_server_version()
  32. File "C:Python26libsite-packagesdjangodbbackendsmysqlbase.py", line 29
  33. 7, in get_server_version
  34. self.cursor()
  35. File "C:Python26libsite-packagesdjangodbbackends__init__.py", line 81,
  36. in cursor
  37. cursor = self._cursor()
  38. File "C:Python26libsite-packagesdjangodbbackendsmysqlbase.py", line 28
  39. 1, in _cursor
  40. self.connection = Database.connect(**kwargs)
  41. File "C:Python26libsite-packagesMySQLdb__init__.py", line 75, in Connect
  42. return Connection(*args, **kwargs)
  43. File "C:Python26libsite-packagesMySQLdbconnections.py", line 170, in __in
  44. it__
  45. super(Connection, self).__init__(*args, **kwargs2)
  46. _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'lo
  47. calhost' (10061)")
  48.  
  49. # SERVER SECTION
  50. # ----------------------------------------------------------------------
  51. #
  52. # The following options will be read by the MySQL Server. Make sure that
  53. # you have installed the server correctly (see above) so it reads this
  54. # file.
  55. #
  56. [mysqld]
  57.  
  58. # The TCP/IP Port the MySQL Server will listen on
  59. port=3306
  60.  
  61. C:Usersfoobar>mysql --port=3306 --user=root --password
  62. Enter password: ********
  63. Welcome to the MySQL monitor. Commands end with ; or g.
  64. Your MySQL connection id is 2
  65. Server version: 5.0.51b-community-nt MySQL Community Edition (GPL)
  66.  
  67. Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
  68.  
  69. mysql> use mysql;
  70. Database changed
  71. mysql> show tables;
  72. +---------------------------+
  73. | Tables_in_mysql |
  74. +---------------------------+
  75. | columns_priv |
  76. | db |
  77. | func |
  78. | help_category |
  79. | help_keyword |
  80. | help_relation |
  81. | help_topic |
  82. | host |
  83. | proc |
  84. | procs_priv |
  85. | tables_priv |
  86. | time_zone |
  87. | time_zone_leap_second |
  88. | time_zone_name |
  89. | time_zone_transition |
  90. | time_zone_transition_type |
  91. | user |
  92. | user_info |
  93. +---------------------------+
  94. 18 rows in set (0.00 sec)
  95.  
  96. DATABASE_ENGINE = 'mysql'
  97. DATABASE_NAME = 'whatever'
  98. DATABASE_USER = '<special app user>'
  99. DATABASE_PASSWORD = '<password for user>'
  100. DATABASE_HOST = '<ip address or host name of server>'
  101. DATABASE_PORT = '3306'
Add Comment
Please, Sign In to add comment