Re: [Pythonmac-SIG] MySQLdb on OS X 10.6

2010-10-30 Thread brinsknaps

Hi Ned,

I really appreciate the reply! I finally made some progress after daunting
attempts to get msyql up and running from macports. Ultimately it had to do
with some permission issues. 

Anyway, I can feel a tad bit closer, but am still running into a roadblock:

$~/ python
Python 2.6.6 (r266:84292, Oct 27 2010, 13:07:13) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type help, copyright, credits or license for more information.
 import MySQLdb
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34:
DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet

Moreover, once I try the syncdb command in django, I get:

$~/Sandbox/mysite/ ./manage.py syncdb
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34:
DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
Traceback (most recent call last):
  File ./manage.py, line 11, in module
execute_manager(settings)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/__init__.py,
line 438, in execute_manager
utility.execute()
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/__init__.py,
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py,
line 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py,
line 219, in execute
self.validate()
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py,
line 249, in validate
num_errors = get_validation_errors(s, app)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/validation.py,
line 86, in get_validation_errors
connection.validation.validate_field(e, opts, f)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/validation.py,
line 14, in validate_field
db_version = self.connection.get_server_version()
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/base.py,
line 313, in get_server_version
self.cursor()
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/__init__.py,
line 75, in cursor
cursor = self._cursor()
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/base.py,
line 297, in _cursor
self.connection = Database.connect(**kwargs)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py,
line 74, in Connect
return Connection(*args, **kwargs)
  File
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/connections.py,
line 170, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, Access denied for user
'admin'@'localhost' (using password: YES))

Again, thanks so much! It's a bit of a relief that I've made it this far!
-- 
View this message in context: 
http://old.nabble.com/MySQLdb-on-OS-X-10.6-tp26311352p30087228.html
Sent from the Python - pythonmac-sig mailing list archive at Nabble.com.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] MySQLdb on OS X 10.6

2010-10-30 Thread Ned Deily
In article 30087228.p...@talk.nabble.com,
 brinsknaps brian.ngu...@gmail.com wrote:
 I really appreciate the reply! I finally made some progress after daunting
 attempts to get msyql up and running from macports. Ultimately it had to do
 with some permission issues. 
 
 Anyway, I can feel a tad bit closer, but am still running into a roadblock:
 
 $~/ python
 Python 2.6.6 (r266:84292, Oct 27 2010, 13:07:13) 
 [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
 Type help, copyright, credits or license for more information.
  import MySQLdb
 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site
 -packages/MySQLdb/__init__.py:34:
 DeprecationWarning: the sets module is deprecated
   from sets import ImmutableSet

Fortunately, that warning can be ignored; it should have no impact on 
anything.  It is an indication, however, that the MySQLdb version in 
MacPorts has not been updated yet from 1.2.2 to 1.2.3, which was 
released earlier this year and, among other changes, removes the source 
of that warning.  Unless you find some other reason that you need to 
update to 1.2.3, I'd advise just living with the warning until the 
MacPorts port is updated and you feel like updating everything:

  $ sudo port selfupdate
  $ sudo port upgrade outdated
 
 Moreover, once I try the syncdb command in django, I get:
 
 $~/Sandbox/mysite/ ./manage.py syncdb
[...]
 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit
 e-packages/MySQLdb/connections.py,
 line 170, in __init__
 super(Connection, self).__init__(*args, **kwargs2)
 _mysql_exceptions.OperationalError: (1045, Access denied for user
 'admin'@'localhost' (using password: YES))

Most likely you don't have the correct values in your Django project's 
settings.py file for one or more of the DATABASE_ variables.  First, 
make sure your MySQL server is up and running and that you can connect 
to it using one of the standard MySQL command line programs like 
mysqladmin5 using a valid MySQL user name and password.  Then edit 
settings.py appropriately.

-- 
 Ned Deily,
 n...@acm.org

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG