Posts tagged ‘mysql’

Django, MySQL, and Windows 7 64-bit installation tips

Here are the solutions to a few annoying things that caused issues when I was installing Python, Django, and MySQL on a new Windows 7 64-bit laptop.

1. Be sure to set your PYTHONPATH variable.

After I installed ActiveState Python, it didn't set up the environmental variable. I added it and restarted the command window, and voilà. (I don't remember having to set that up manually on my XP machine, but I could be mistaken since it's been a very long time since I installed everything on that machine. Regardless, it's a good thing to check. *g* Also check your PATH variable, to make sure that Python, Django, and MySQL are all in there.)

2. Assign the read_default_file setting in the database dictionary.

I was getting "Error 2003: Can't connect to MySQL server on 'localhost' (10061)." It wasn't the firewall blocking the port, because mysql is running on a socket. (Though I could be wrong, as I just switched over to Codomo from ZoneAlarm, which had issues with Win7 64-bit and Filezilla, and I haven't learned all of Codomo's quirks yet, so who knows?) Even though I've got the admin service set up to execute "C:\progs\mysql\bin\mysqld" --defaults-file="C:\progs\mysql\my.ini" MySQL, it still wasn't finding the ini file for some reason. Weirdly, telling Django which my.ini file to run MySQL with fixed it. In your, in the database section, you'll add the OPTIONS entry:

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'database_name',                      
        'USER': 'username',
        'PASSWORD': 'password',
        'HOST': '',
        'PORT': '',
        'OPTIONS': {
            'read_default_file': 'c:\path\to\your\my.ini',

qmail + vpopmail + ezmlm + mysql: ezmlm list-making notes

I've been setting up nginx, qmail, vpopmail, ezmlm-idx, etc., on my new VPS on slicehost (yay, slicehost!), and figured I'd post my notes in case they're useful to anyone else, since finding even tiny bits and pieces helped along the way and kept me from tearing my hair out while trying to work out how everything fits together. *vbg*

These are my (very brief) notes about how to set up a new mailing list in ezmlm, when using vpopmail's virtual domains with a mysql backend. (Yes, I realize I haven't posted about the parts of the server set up that came first, but these are the most complete notes I have at the moment. *g*)

Continue reading 'qmail + vpopmail + ezmlm + mysql: ezmlm list-making notes' »

New work project up

Online school directory for El Paso and Teller counties, Colorado, USA (broken now). (The much better, non-corporate mush version is here on my site. [Also dead now, as I don't want to update the code for newer versions of php and mysql.]) I have a ton of additions and improvements that I want to add as I have time, not the least of which is point clustering and geocoding/adding an address marker and displaying schools within a certain radius.

To be added at a later date:

  • point clustering
  • figure out how to scan a JSON file to pull out just certain records from the array (all records in category c) so I can load everything once, rather than having to make a php/mysql call for each option; otherwise I need to figure out how to get an animated "I'm loading, dammit!" graphic to work with the asynchronous data call
  • zoom to district boundaries when displaying that district's schools
  • link to district info/schools from legend
  • label district polygons
  • display schools within x radius of a user input address (temp fix in the meantime: directions to and from links)
  • swap KML polygons out for encoded polygons for districts
  • display district data when brining up the district's schools
  • standardized test scores (and other associated CDE annual benchmarks) for each school and district

Suggestions and comments welcome, as they always are on everything I work on. :)