On Friday, 15 March 2013 19:31:07 UTC-5, Jonathan Lundell wrote:
>
> On 15 Mar 2013, at 3:44 PM, Martín Mulone <[email protected]<javascript:>> 
> wrote:
>
> In my experience recently I had many problems with pymysql, so I switch to 
> mysqldb using dal.
>
>
> I'll give it a try. A question, though. The book suggests:
>
> from gluon.dal import MySQLAdapter
> MySQLAdapter.driver = mysqldb
>
>
should be  

MySQLAdapter.driver = 'mysqldb'



Basically  is a list of names of supported drivers MySQLAdapter.drivers and 
MySQLAdapter.driver 
is the name of the selected one. Must be installed.

>  
>
>
 

> But just what is the symbol mysqldb? And how does it relate to the driver 
> names in gluon.dal?
>
>         import MySQLdb
>         DRIVERS.append('MySQL(MySQLdb)')
>
> ...
>
> class MySQLAdapter(BaseAdapter):
>     drivers = ('MySQLdb','pymysql')
>
>
>
>
> El 15/03/2013 13:18, "Jonathan Lundell" <[email protected] <javascript:>> 
> escribió:
>
>> On 15 Mar 2013, at 8:15 AM, Niphlod <[email protected] <javascript:>> 
>> wrote:
>>
>> you could set some filters and with the frid it should export only the 
>> records shown, not the whole table....
>>
>>
>> I think I'll write a script to parse the database dump into a csv file 
>> instead; it's a lot quicker.
>>
>> But this seems like a bug to me: at least in the admin app, a table 
>> export ought to Just Work; it's pretty trivial, after all, even if it's 
>> large.
>>
>>
>> PS: passing driver_args = {} should do the job with pymysql, but I don't 
>> see any forums showing that that kind of error is driver-dependant on some 
>> kind of timeout parameter (as is in sqlite).... seems a mysql configuration 
>> directive (meaning my.cnf, mysql.ini, etc)...
>>
>> *wait_timeout = *
>> *connect_timeout =*
>> or more probably
>> *net_read_timeout*
>>
>> cfr. http://dev.mysql.com/doc/refman/5.0/en/error-lost-connection.html
>>
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to