Docker follows the tutorials to deploy MYSQL problems encountered with pyspider,.

execute the command:
docker run-- name scheduler-d-- link mysql:mysql-- link rabbitmq:rabbitmq binux/pyspider:latest scheduler

finally, there was a problem with the deployment of webui. I went to check the scheduler log:
docker logs scheduler:
the final error result is:
File "/ usr/local/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 102, in dbapi

return __import__("MySQLdb")

ImportError: No module named MySQLdb

I don"t know anything about docker, could you tell me how to solve this situation? Is it my own system that comes with a PYTHON2.7 package that doesn"t have this MySQLdb or what"s going on?

Mar.13,2021

day2:
I changed the mysql container to the mongo deployment run log without error, but I still can't run it. It is estimated that the docker deployment of pyspider still depends on mysql.

day3:
I put the environment under win10 to execute this official website docker command, and the error remains the same. Now figure out if you can modify the container, or find the historical version of the container.

day3.1:
ider/commit/124b9f2b6a55cf2332bea5c0cce44d3bb2669299" rel=" nofollow noreferrer "> https://github.com/binux/pysp.
found a solution on github, just as I thought, but I still don't know how to solve it. I'm going to learn a little about how to use docker.

day5:
binux/pyspider Container mysql solution URL:
ider/issues/715" rel=" nofollow noreferrer "> https://github.com/binux/pysp.

linux command operation:
$: mkdir pyspiderproject & & cd pyspiderproject
$: touch Dockerfile
$: gedit Dockerfile
document input:
FROM binux/pyspider
RUN pip install MySQL-python
VOLUME ["/ opt/pyspider"]
ENTRYPOINT ["pyspider"]
EXPOSE 5000 23333 24444 25555
$: docker build-t binux/pyspider:my.

then various stop rm containers, and then operate according to the official document.

found a solution to the problem, and now the error report is different. The current error report is:

$: docker logs result_worker

sqlalchemy.exc.OperationalError: (_ mysql_exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded: / usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory") (Background on this error at: http://sqlalche.me/e/e3q8)

my guess is that the mysql container modified the operation method so that pyspider could not link to this version of the mysql container. The initial intention is to look for older versions of mysql for version use.

day5.1:
finally, I successfully solved the problem. Sure enough, the version of mysql does not match, so I need to change mysql:latest to mysql:5.7
and run it all the way to the end. Dashboard opens very slowly, my heart is getting cold, but it turns on, and the test runs successfully. Perfect.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bec791-31b19.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bec791-31b19.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?