grimoirelab-tutorial icon indicating copy to clipboard operation
grimoirelab-tutorial copied to clipboard

Add a section about MySQL to Supporting Systems

Open filmaj opened this issue 7 years ago • 4 comments

I am trying to run the sirmordred tests. First I needed to get an ElasticSearch instance up locally. Now it looks like I need a MySQL DB as well. There is no mention of MySQL under the Supporting Systems section of the tutorial. Should that be added? If so, any suggestions on how to (quickly) do so, maybe via docker? Do the maintainers of the project have any shortcuts for this?

Related question around the Supporting Systems section of the tutorial: the table of contents has several related bits that are scattered around the document. I wonder if it makes sense to combine certain sections together (and maybe split them up under related sub-sections)? For example, there is a section around installing ElasticSearch, another section around installing Kibana, and a final (and, arguably, most useful / best for newcomers) section around installing both using Docker. In my opinion, we should direct newcomers to installing the docker ES+Kibana container first, as it is (to me) the most convenient of the three options. Perhaps we can combine the current ES, Kibana and ES+Kibana documentation into one section and re-order to put docker installation instructions at the top?

Let me know what the team thinks. I am happy to put together a PR for this if I can get direction from the team.

Cheers, Fil

filmaj avatar Jun 27 '18 15:06 filmaj

For the record I was able to fairly easily do this via:

docker run --name mysqlserver --env MYSQL_ALLOW_EMPTY_PASSWORD=1 --env MYSQL_ROOT_PASSWORD="" -p 3306:3306 -d mysql/mysql-server:latest

Unfortunately I also had to duplicate the default root user in the DB and change its Host field to allow connections from a host other than localhost, otherwise I would get a "host is not allowed to connect to this mysql server." I followed this StackOverflow question as a template to fix this.

filmaj avatar Jun 27 '18 16:06 filmaj

@filmaj sorry for being so late with this. Please have a look at the pull request adding this to the tutorial, #48. If you happen to remember exactly which SQL commands are needed for creating that secondary root account, please add them in a comment and I will add them to the pull request. I also don't know how you connect to the container, if you cannot connect from other than localhost: by connecting from inside the container? Instructions on how how you did that are welcome.

jgbarah avatar Oct 26 '18 08:10 jgbarah

Just for further posterity in case someone stumbles upon this issue, I tried another attempt at this and after some playing around, I suggest using the mysql docker image instead of the mysqlserver one, i.e.:

docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql

filmaj avatar Oct 26 '18 15:10 filmaj

This could be a part of the issue #186

vchrombie avatar Jan 16 '22 15:01 vchrombie