[Reprozip-users] About Reprozip

Rémi Rampin remi.rampin at nyu.edu
Tue Mar 15 16:07:40 EDT 2016


2016-03-14 19:55 EDT, Ruochen Jiang <ruochenj at sfu.ca>:

> Hi Rémi,
>
> Here's a new problem.
>
> When I tried to reprozip a project which has basic mysql database
> functions I got an error "django.db.utils.OperationalError: (2002, "Can't
> connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
> (2)")" (see screenshot)
>
> I also attached my rpz file.
>
> Thanks.


Hi,

This is because MySQL wasn't packed with your web app. You need to trace
both of them so that they both end up in the pack, or more simply use an
embedded database like SQLite3.

We have a FAQ entry here: Can ReproZip pack a client-server scenario?
<http://reprozip.readthedocs.org/en/1.0.x/faq.html#can-reprozip-pack-a-client-server-scenario>

If you choose to go down this path, you'll basically need to do something
like this:

sudo service mysqld stop
reprozip trace sh -c 'SCRIPT_TO_START_MYSQL; python manage.py runserver
0.0.0.0:8000; SCRIPT_TO_STOP_MYSQL'
sudo service mysqld start


Unfortunately mysql is very annoying on Ubuntu, and the (contrived) init
scripts won't work on ReproZip because of systemd
<http://reprozip.readthedocs.org/en/1.0.x/troubleshooting.html#systemd>.
You should be able to start MySQL with /usr/bin/mysqld_safe, but stopping
it is complex.

Best
-- 
Rémi Rampin
ReproZip Developer
NYU Tandon School of Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vgc.poly.edu/pipermail/reprozip-users/attachments/20160315/f1f6229f/attachment.html>


More information about the Reprozip-users mailing list