Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- DATABASE_NAME = 'Python' # Or path to database file if using sqlite3.
- DATABASE_USER = 'root' # Not used with sqlite3.
- DATABASE_PASSWORD = '' # Not used with sqlite3.
- DATABASE_HOST = 'localhost' # Set to empty string for localhost. Not used with sqlite3.
- DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
- Traceback (most recent call last):
- File "manage.py", line 11, in <module>
- execute_manager(settings)
- File "C:Python26libsite-packagesdjangocoremanagement__init__.py", line
- 362, in execute_manager
- utility.execute()
- File "C:Python26libsite-packagesdjangocoremanagement__init__.py", line
- 303, in execute
- self.fetch_command(subcommand).run_from_argv(self.argv)
- File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 195,
- in run_from_argv
- self.execute(*args, **options.__dict__)
- File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 221,
- in execute
- self.validate()
- File "C:Python26libsite-packagesdjangocoremanagementbase.py", line 249,
- in validate
- num_errors = get_validation_errors(s, app)
- File "C:Python26libsite-packagesdjangocoremanagementvalidation.py", lin
- e 67, in get_validation_errors
- connection.validation.validate_field(e, opts, f)
- File "C:Python26libsite-packagesdjangodbbackendsmysqlvalidation.py", l
- ine 15, in validate_field
- db_version = connection.get_server_version()
- File "C:Python26libsite-packagesdjangodbbackendsmysqlbase.py", line 29
- 7, in get_server_version
- self.cursor()
- File "C:Python26libsite-packagesdjangodbbackends__init__.py", line 81,
- in cursor
- cursor = self._cursor()
- File "C:Python26libsite-packagesdjangodbbackendsmysqlbase.py", line 28
- 1, in _cursor
- self.connection = Database.connect(**kwargs)
- File "C:Python26libsite-packagesMySQLdb__init__.py", line 75, in Connect
- return Connection(*args, **kwargs)
- File "C:Python26libsite-packagesMySQLdbconnections.py", line 170, in __in
- it__
- super(Connection, self).__init__(*args, **kwargs2)
- _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'lo
- calhost' (10061)")
- # SERVER SECTION
- # ----------------------------------------------------------------------
- #
- # The following options will be read by the MySQL Server. Make sure that
- # you have installed the server correctly (see above) so it reads this
- # file.
- #
- [mysqld]
- # The TCP/IP Port the MySQL Server will listen on
- port=3306
- C:Usersfoobar>mysql --port=3306 --user=root --password
- Enter password: ********
- Welcome to the MySQL monitor. Commands end with ; or g.
- Your MySQL connection id is 2
- Server version: 5.0.51b-community-nt MySQL Community Edition (GPL)
- Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
- mysql> use mysql;
- Database changed
- mysql> show tables;
- +---------------------------+
- | Tables_in_mysql |
- +---------------------------+
- | columns_priv |
- | db |
- | func |
- | help_category |
- | help_keyword |
- | help_relation |
- | help_topic |
- | host |
- | proc |
- | procs_priv |
- | tables_priv |
- | time_zone |
- | time_zone_leap_second |
- | time_zone_name |
- | time_zone_transition |
- | time_zone_transition_type |
- | user |
- | user_info |
- +---------------------------+
- 18 rows in set (0.00 sec)
- DATABASE_ENGINE = 'mysql'
- DATABASE_NAME = 'whatever'
- DATABASE_USER = '<special app user>'
- DATABASE_PASSWORD = '<password for user>'
- DATABASE_HOST = '<ip address or host name of server>'
- DATABASE_PORT = '3306'
Add Comment
Please, Sign In to add comment