Thanks :) I was able to connect but I was not able to define table?
When I try to define a table it gives an sql syntax error like below:
ProgrammingError: (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(users.username,1,1))\n) ENGINE=InnoDB
CHARACTER SET utf8' at line 4")
I added the code below:
db.define_table('users', Field('username', 'string'))
Other thing that I want to ask is about using a db connection created
in db.py, in other custom python modules. Do I have to use that
connection or can I create another custom db module for flexible db
operations.
Regards,
Kutlu
On Nov 12, 7:00 pm, Dmitri Zagidulin <[email protected]> wrote:
> Ah, you were able to connect. Ignore that, then :)
>
> On Nov 12, 11:59 am, Dmitri Zagidulin <[email protected]> wrote:
>
>
>
> > Did you set the root mysql password? Try setting it, and including the
> > password in the connect string.
>
> > Did it give you any error messages?
>
> > On Nov 11, 5:53 pm, ShoqulKutlu <[email protected]> wrote:
>
> > > Hi,
>
> > > I installed web2py Version 1.72.3 on Windows. When I started the
> > > web2py server it found the MySql driver. But I couldn't get connected
> > > to mysql in db.py. I tried following connection strings:
>
> > > db = DAL("mysql://root:@localhost:3306/test")
>
> > > or
>
> > > db = DAL("mysql://root:@localhost/test")
>
> > > both didn't work. Even the web2py server found mysql driver, I also
> > > installed mysqldb driver but still fails the connection. Did I miss
> > > something?
>
> > > Thank you
> > > Kutlu- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---