What version of web2py are you running? A few recent revisions had a bug in
sql.py, it is fixed in trunk.

-Thadeus




On Sat, Nov 14, 2009 at 4:31 PM, Benigno <bca...@albendas.com> wrote:

>
> Actually, no I didnt. (I didnt know it was necessary).
>
> I have done so now, and still get the same error though.
>
>
> On Nov 14, 7:02 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> > Did you delete your .table files and sql.log file before the switch?
> >
> > -Thadeus
> >
> > On Sat, Nov 14, 2009 at 9:59 AM, Benigno <bca...@albendas.com> wrote:
> >
> > > Hi,
> >
> > >    I have just installed a working application (working on sqlLite)
> > > and now need to move it to MySQL, I have created a DB, and user with
> > > access rights (on localhost), and changed db.py db definition to
> > > 'mysql://username:passw...@localhost/dbname'
> >
> > >    I am getting the following error when I try to access any page on
> > > the application:
> >
> > > S'Traceback (most recent call last):
> > > File "/Users/benigno/PyProjects/AlbenDas_web2py/gluon/restricted.py",
> > > line 184, in restricted\n  File "/home/albendas/public_html/
> > >www.albendas.com/applications/domotica/models/db.py", line 52, in
> > > <module>
> > > auth.define_tables()                         # creates all needed
> > > tables
> > > File "/Users/benigno/PyProjects/AlbenDas_web2py/gluon/tools.py", line
> > > 748, in define_tables
> > > File "/Users/benigno/PyProjects/AlbenDas_web2py/gluon/sql.py", line
> > > 1205, in define_table
> > > File "/Users/benigno/PyProjects/AlbenDas_web2py/gluon/sql.py", line
> > > 1607, in _create
> > > File "/Users/benigno/PyProjects/AlbenDas_web2py/gluon/sql.py", line
> > > 879, in <lambda>
> > > File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166,
> > > in execute
> > >   self.errorhandler(self, exc, value)
> > > File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line
> > > 35, in defaulterrorhandler
> > >   raise errorclass, errorvalue\nProgrammingError: (1064, "You have an
> > > error in your SQL syntax; check the manual that corresponds to your
> > > MySQL server version for the right syntax to use near \'SUBSTRING
> > > (auth_user.registration_key,1,1))\
> > > ) ENGINE=InnoDB CHARACTER SET utf8\' at line 8")'
> >
> > > My MySQL Version is: MySQL 5.0.51a-3ubuntu5.4
> >
> > > Any help appreciated.
> > > Benigno.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to