librelist archives

« back to archive

mysql socket

mysql socket

From:
Stéphane Guedon
Date:
2014-04-04 @ 09:33
Hello

How can I pass my mysql socket path to flask (or precisely to 
sqlalchemy) ?

my entire webserver is chrooted and mysql has its socket inside the 
chroot, but flask (running under supervisor) is chrooted itself...

Re: [flask] mysql socket

From:
Daniele Sluijters
Date:
2014-04-07 @ 07:59
app.config['SQLALCHEMY_DATABASE_URI'] = 
''mysql://user:password@localhost/database?unix_socket=/usr/local/mysql5/mysqld.sock

Kind regards,

--
Daniele Sluijters
w: http://www.nedap.com
e: daniele.sluijters@nedap.com<mailto:daniele.sluijters@nedap.com>
t: +31 (0) 544 471 764

N.V. Nederlandsche Apparatenfabriek 'Nedap'
Parallelweg 2 NL-7141 DC GROENLO
Trade Register 08013836

On 4 Apr 2014, at 11:33, Stéphane Guedon 
<stephane@22decembre.eu<mailto:stephane@22decembre.eu>> wrote:

Hello

How can I pass my mysql socket path to flask (or precisely to
sqlalchemy) ?

my entire webserver is chrooted and mysql has its socket inside the
chroot, but flask (running under supervisor) is chrooted itself...