Question: MySQL db connection error or ?
gravatar for feliyon
6 weeks ago by
feliyon10 wrote:

Hello Community,

I am having a problem with the change from single user to production environment. When switching to mysql, the system doesn't load up, but when using sqlite it has no problem at line 19 (uwsgi). This is the error:

File "/home/galaxy/galaxy/.venv/lib/python2.7/site-packages/yaml/", l ine 98, in check_event self.current_event = self.state() File "/home/galaxy/galaxy/.venv/lib/python2.7/site-packages/yaml/", l ine 439, in parse_block_mapping_key "expected <block end="">, but found %r" %, token.start_mark) yaml.parser.ParserError: while parsing a block mapping in "/home/galaxy/galaxy/config/galaxy.yml", line 19, column 1 expected <block end="">, but found '<block mapping="" start="">' in "/home/galaxy/galaxy/config/galaxy.yml", line 127, column 3

At the galaxy.yml, I have followed the galaxy documentation info, it is as following for the db:

database_connection: mysql://admin:passss@localhost/galax_db

database_connection: mysql:///galax_db?unix_socket=/usr/sbin/mysqld.sock

I have tried with/out the heading for the second line, but still comes the error at loading line 19 (uwsgi, I guess some parameter don't work) and at line 127, database_engine_option_pool_recycle: 7200, also the mysql global timeout was changed to 28800, therefore I think it is that it doesn't connect, as it works fine with sqlite.

Looking forward to your advice. Felipe

mysql software error • 133 views
ADD COMMENTlink modified 6 weeks ago by Wolfgang Maier600 • written 6 weeks ago by feliyon10
gravatar for Wolfgang Maier
6 weeks ago by
Wolfgang Maier600 wrote:

try enclosing your settings in single quotes, e.g.:

database_connection: 'mysql:///galax_db?unix_socket=/usr/sbin/mysqld.sock'
ADD COMMENTlink written 6 weeks ago by Wolfgang Maier600

Since my db has user and pass, I'll guess it should go full line like:


Gives the same error, should I specify socket? Should it has /// or just // I am having doubts if it should contain mysqld or just mysql without the d, since I don't know the difference between those executables.

ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by feliyon10

a few points to check:

  • it is just '//' in front of "username:password"

  • try using the full name of the server/host instead of 'localhost'

  • 'mysqld.sock' should be right, but is the path '/usr/sbin/' correct

and just as a comment: why don't you switch from sqlite to PostgreSQL ?


ADD REPLYlink written 5 weeks ago by Hotz, Hans-Rudolf1.8k

Hans-Rudolf has already provided some useful comments. If it is true that you are still getting the original yaml.parser.ParserError about some lines in your galaxy.yml file, then you are currently still fighting an issue with reading that file correctly (any additional problems with connecting to the database will strike later). There are two important aspects to know about the galaxy.yml file syntax: indentation matters (it's used to group parameters) and if a value contains special characters (like :, ?, etc.) you better enclose it in single quotes (hence my first suggestion). Since quoting didn't help it seems likely that you have an indentation problem somewhere. Specifically, uwsgi: and galaxy: should be the only tokens without indentation, everything else in your file should be indented to the same level.

ADD REPLYlink written 5 weeks ago by Wolfgang Maier600

thanks on the indentation details, it was definitely not reading correctly due to that, now works fine.

ADD REPLYlink written 4 weeks ago by feliyon10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 176 users visited in the last hour