Are you sure the socket is being created on /tmp? Because that's what the error is pointing our: You said Django should communicate with MySQL though a socket file in /tmp called "mysql.sock", but there was some problem with it. You should probably check your MySQL config file (/etc/my.cnf) to assure the socket is being created there.
(On my local install, the socket is in /var/lib/mysql, so you probably just update your settings).On Mon, Dec 18, 2017 at 4:13 PM, Alan <alanwilter@gmail.com> wrote:
I am trying this in a VM with ubuntu 16.04:--bash Miniconda3-latest-Linux-x86_64.sh sudo apt-get install rabbitmq-serversudo systemctl start rabbitmq-serverpip install Django celery PyMySQLsudo apt-get install mysql-servermysql_secure_installationmysql -u root -pmysql> CREATE USER 'acpype_mysql'@'localhost' IDENTIFIED BY '_bla_bla_';mysql> GRANT ALL PRIVILEGES ON * . * TO 'acpype_mysql'@'localhost';conda install -c bioconda mysqlclientAnd once I have copied my django project, I try:python manage.py makemigrationswhich will fail with:django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)") from my settings.pyDATABASES = {'default': {'ENGINE': 'django.db.backends.mysql','NAME': 'acpype_db','USER': 'acpype_mysql','PASSWORD': '_bla_bla_','HOST': 'localhost','PORT': '','HOST': '/tmp/mysql.sock',}}Many thanks in advance,Alan--I'll cycle across Britain in 2018 for a charity, would you considersupporting my cause? http://uk.virginmoneygiving.com/ AlanSilva Many thanks!--Alan Wilter SOUSA da SILVA, DScSenior Bioinformatician, UniProtEuropean Bioinformatics Institute (EMBL-EBI)European Molecular Biology LaboratoryWellcome Trust Genome CampusHinxtonCambridge CB10 1SDUnited KingdomTel: +44 (0)1223 494588
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ .CAEznbzm7J8mq-f9n% 2BqStPYSqgii1NxgiXTgdN1s56d0vL NaAQw%40mail.gmail.com
For more options, visit https://groups.google.com/d/optout .
--
Julio Biason, Sofware Engineer
AZION | Deliver. Accelerate. Protect.
Office: +55 51 3083 8101 | Mobile: +55 51 99907 0554
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEM7gE3Hqavjr%2BV_bk-Nf3DkSZq%2Bu7gSnymt7HuG%2BvyVDSCJEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment