Question: Mysql Backend Setup
0
gravatar for Stein, Olaf
8.7 years ago by
Stein, Olaf • 100
Stein, Olaf • 100 wrote:
Hi all, Very new to galaxy and trying to setup an instance here with mysql as the backend database. I added this line: mysql:///galaxy?unix_socket=/var/run/mysqld/mysqld.sock To the universe_wsgi.ini file Where do I define the dbuser, password and database that I want to use? And what else do I need to do, for instance create the schema, etc? Thanks Olaf Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
galaxy • 1.0k views
ADD COMMENT • link • modified 8.7 years ago by Nate Coraor ♦ 3.2k • written 8.7 years ago by Stein, Olaf • 100
0
gravatar for Nate Coraor
8.7 years ago by
Nate Coraor ♦ 3.2k
United States
Nate Coraor ♦ 3.2k wrote:
Hi Olaf, Galaxy will automatically create the tables/etc. upon startup. To set the user, password, and database, use a URL like this: mysql://user@pass:/dbname?unix_socket=/var/run/mysqld/mysqld.sock --nate
ADD COMMENT • link written 8.7 years ago by Nate Coraor ♦ 3.2k
Thanks Now I get this: galaxy.model.migrate.check DEBUG 2010-03-08 14:04:00,428 MySQL_python egg successfully loaded for mysql dialect Traceback (most recent call last): File "/export/home/steino/galaxy-dist/lib/galaxy/web/buildapp.py", line 61, in app_factory app = UniverseApplication( global_conf = global_conf, **kwargs ) File "/export/home/steino/galaxy-dist/lib/galaxy/app.py", line 28, in __init__ create_or_verify_database( db_url, self.config.database_engine_options ) File "/export/home/steino/galaxy- dist/lib/galaxy/model/migrate/check.py", line 50, in create_or_verify_database engine = create_engine( url, **engine_options ) File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r649 8-py2.4.egg/sqlalchemy/engine/__init__.py", line 223, in create_engine return strategy.create(*args, **kwargs) File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r649 8-py2.4.egg/sqlalchemy/engine/strategies.py", line 46, in create u = url.make_url(name_or_url) File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r649 8-py2.4.egg/sqlalchemy/engine/url.py", line 137, in make_url return _parse_rfc1738_args(name_or_url) File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r649 8-py2.4.egg/sqlalchemy/engine/url.py", line 173, in _parse_rfc1738_args return URL(name, **components) File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r649 8-py2.4.egg/sqlalchemy/engine/url.py", line 49, in __init__ self.port = int(port) ValueError: invalid literal for int(): And my mysql port is standard 3306. Any ideas? Thanks Olaf Hi Olaf, Galaxy will automatically create the tables/etc. upon startup. To set the user, password, and database, use a URL like this: mysql://user@pass:/dbname?unix_socket=/var/run/mysqld/mysqld.sock --nate Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
ADD REPLY • link written 8.7 years ago by Stein, Olaf • 100
Hi Olaf, Could you paste the DB url you're using? Anonymizing the user/pass of course. Thanks, Kanwei On Mon, Mar 8, 2010 at 4:08 PM, Stein, Olaf
ADD REPLY • link written 8.7 years ago by Kanwei Li • 270
database_connection = mysql://xxx@xxx:/galaxy?unix_socket=/var/lib/mysql/mysql.sock Hi Olaf, Could you paste the DB url you're using? Anonymizing the user/pass of course. Thanks, Kanwei On Mon, Mar 8, 2010 at 4:08 PM, Stein, Olaf Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
ADD REPLY • link written 8.7 years ago by Stein, Olaf • 100
Ah, probably the :, I thought it was valid to leave out the hostname when connecting via a socket. Try: mysql://xxx@xxx:localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock
ADD REPLY • link written 8.7 years ago by Nate Coraor ♦ 3.2k
database_connection = mysql://xxx@xxx/galaxy?unix_socket=/var/lib/mysql/mysql.sock The "galaxy" after the uname and pw is the host or dbname? I am asking because I get this: OperationalError: (OperationalError) (2005, "Unknown MySQL server host 'galaxy' (1)") None None Ah, probably the :, I thought it was valid to leave out the hostname when connecting via a socket. Try: mysql://xxx@xxx:localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
ADD REPLY • link written 8.7 years ago by Stein, Olaf • 100
Sorry, did not see the localhost in there Now using: # instead. PostgreSQL and MySQL are supported. database_connection = mysql://xxx@xxx:localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock Still get the the issue with the post however: File "/export/home/steino/galaxy-dist/eggs/SQLAlchemy-0.5.6_dev_r6498 -py2.4.egg/sqlalchemy/engine/url.py", line 49, in __init__ self.port = int(port) ValueError: invalid literal for int(): localhost Ah, probably the :, I thought it was valid to leave out the hostname when connecting via a socket. Try: mysql://xxx@xxx:localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
ADD REPLY • link written 8.7 years ago by Stein, Olaf • 100
This is what happens when I go from memory. The DB engine URL documentation is here: http://www.sqlalchemy.org/docs/05/dbengine.html I had the '@' and ':' reversed. mysql://xxx:xxx@localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock Sorry for all the confusion.
ADD REPLY • link written 8.7 years ago by Nate Coraor ♦ 3.2k
Thanks... I have never used sqlalchemy so no knowledge on the connection string, now that I see it I could have come up with that myself though Works now Olaf This is what happens when I go from memory. The DB engine URL documentation is here: http://www.sqlalchemy.org/docs/05/dbengine.html I had the '@' and ':' reversed. mysql://xxx:xxx@localhost/galaxy?unix_socket=/var/lib/mysql/mysql.sock Sorry for all the confusion. Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children's Drive 43205 Columbus, OH phone: 1-614-355-5685 cell: 1-614-843-0432 email: olaf.stein@nationwidechildrens.org "I consider that the golden rule requires that if I like a program I must share it with other people who like it." Richard M. Stallman
ADD REPLY • link written 8.7 years ago by Stein, Olaf • 100
Please log in to add an answer.

Help
Access

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