If you use SQLite and the database doesn't already exist, it will be created for you. However, when using other DBs, you have to first create the database outside of web2py before web2py can connect to it. Also, the connection string for MySQL should be something like:
mysql://username:password@localhost/mydb See http://web2py.com/book/default/chapter/06#Connection-Strings. Also, that FAQ entry is fairly old. Instead of using SQLDB() and SQLField(), you should now use DAL() and Field() (they are equivalent, but the former two have been deprecated). Anthony On Wednesday, October 19, 2011 8:11:54 PM UTC-4, now0pen wrote: > > Hi, > > I am a python/web2py noob. Following this tutorial -- > http://www.web2py.com/AlterEgo/default/show/110 > > ... where my web2py is deployed with fluxflex.com. After I finished > everything and accessed the site, I got the error message -- Internal > error Ticket issued: blog/ > 4ddbe3d13c161dc281968279d5a70093.2011-10-19.23-54-49.652a53b7-22a2-445b- > a93a-1fa4c83f26be > > Where if I clicked on the ticket, showed a lot of things, but this one > caught my attention -- > <type 'exceptions.SyntaxError'>(Error in URI 'MYSQL' or database not > supported) > > I remember that fluxflex runs MYSQL, but the tutorial I followed used > sqlite. > > db=SQLDB('sqlite://db.db') > db.define_table('message', > SQLField('title',requires=IS_NOT_EMPTY()), > SQLField('author',requires=IS_NOT_EMPTY()), > SQLField('email',requires=IS_EMAIL()), > SQLField('body','text',requires=IS_NOT_EMPTY())) > > I went into models/db.py and changed the code to -- > > db=SQLDB('mysql://db.db') > db.define_table('message', > SQLFIELD('title',requires=IS_NOT_EMPTY()), > SQLFIELD('author',requires=IS_NOT_EMPTY()), > SQLFIELD('email',requires=IS_EMAIL()), > SQLFIELD('body','text',requires=IS_NOT_EMPTY())) > > .... but I am still getting an error message. > > I hope I have given all the information. Let me know if there's > anything I missed. What should I do to get the site running? > > Thanks in advance! > > Jim

