Note that there are some explanatory texts on larger screens.

plurals
  1. POUse Django and MySQL on Windows
    primarykey
    data
    text
    <p>I am just starting to get into Python and decided to download the Django Framework as well, I have that working just fine but then I tried to create my first "Django App" (the tutorial at the Django website) and when I ran into the "Database setup" I start having issues I am using Windows 7 and I've always played around with MySQL in WAMP before uploading to the server so I figured I'd try this here as well, but I just couldn't connect it even after configuring the settings.py like this:</p> <pre><code>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. </code></pre> <p>I then downloaded and managed to correctly install MySQLdb so I can now do python import MySQLdb however I get this message and I really don't know how to get past this:</p> <pre><code>Traceback (most recent call last): File "manage.py", line 11, in &lt;module&gt; execute_manager(settings) File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line 362, in execute_manager utility.execute() File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Python26\lib\site-packages\django\core\management\base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "C:\Python26\lib\site-packages\django\core\management\base.py", line 221, in execute self.validate() File "C:\Python26\lib\site-packages\django\core\management\base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "C:\Python26\lib\site-packages\django\core\management\validation.py", lin e 67, in get_validation_errors connection.validation.validate_field(e, opts, f) File "C:\Python26\lib\site-packages\django\db\backends\mysql\validation.py", l ine 15, in validate_field db_version = connection.get_server_version() File "C:\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 29 7, in get_server_version self.cursor() File "C:\Python26\lib\site-packages\django\db\backends\__init__.py", line 81, in cursor cursor = self._cursor() File "C:\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 28 1, in _cursor self.connection = Database.connect(**kwargs) File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 75, in Connect return Connection(*args, **kwargs) File "C:\Python26\lib\site-packages\MySQLdb\connections.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)") </code></pre> <p>Should I still configure something or did I misconfigured at some point? Also I'm not entirely sure if WAMP should be running at this point =S but haven't been able to find anything on Google as to what's the problem I'm facing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload