[Reprozip-users] About Reprozip
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.
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?
If you choose to go down this path, you'll basically need to do something
sudo service mysqld stop
reprozip trace sh -c 'SCRIPT_TO_START_MYSQL; python manage.py runserver
sudo service mysqld start
Unfortunately mysql is very annoying on Ubuntu, and the (contrived) init
scripts won't work on ReproZip because of systemd
You should be able to start MySQL with /usr/bin/mysqld_safe, but stopping
it is complex.
NYU Tandon School of Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Reprozip-users