Difference between revisions of "Solid mysql database"

From Hall A Wiki
Jump to: navigation, search
(ssh tunnel to access the server)
Line 22: Line 22:
 
ssh -N -g -L 3306:soliddb:3306 your_jlab_username@login.jlab.org
 
ssh -N -g -L 3306:soliddb:3306 your_jlab_username@login.jlab.org
  
then mysql command to host 127.0.0.1 will be redirect to soliddb.jlab.org
+
then mysql command to host 127.0.0.1 will be redirect to soliddb.jlab.org (somehow hostname localhost doesn't work for mysql, make sure to use 127.0.0.1 instead)
  
 
==a problem and fix==
 
==a problem and fix==

Revision as of 11:58, 1 March 2011

soliddb.jlab.org

GEMC read geometry/material/sensitivity ,magnetic field map info and output banks info in mysql database.

For solid, the database server currently used is soliddb.jlab.org, which is mysql server 5.x and runs on a mysql cluster within virtual machine nodes and is managed by Jlab computer center.

You need to access it when you running the simulation or update detector info into the database.

There's two user accounts.

read only account for running  simulation: user "soliduser" password "ilovesolid"
read/write account for updating database : user "soliddev" password "ask solid developer, eg Zhiwen zwzhao@jlab.org"

On the server, two groups of database are used. "solid_geometry" is used for official detector geometry/material/sensitivity and magnetic field map info. "solid_banks" is used for official output banks info. "user_geometry" and "user_banks" are used for user modified geometry and banks

mysql-workbench, a gui tool to view database content http://dev.mysql.com/downloads/workbench/

ssh tunnel to access the server

The soliddb server is behind Jlab firewall, if you are not on jlab internal network, you only can access it by ssh tunneling with the command line below in linux

ssh -N -g -L 3306:soliddb:3306 your_jlab_username@login.jlab.org

then mysql command to host 127.0.0.1 will be redirect to soliddb.jlab.org (somehow hostname localhost doesn't work for mysql, make sure to use 127.0.0.1 instead)

a problem and fix

the error message is like "Host 'jlab15.jlab.org' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'". Its cause is the default mysql has max_connect_errors as 10, if from one ip, the connect error reach 10, the ip will be blocked. It happened to the login server group (login1 with alias jlab14, and login2 with jlab15). The only way to reopen the ip is "mysqladmin flush-hosts" on the host which only CC can do it. I asked Sherman from CC to raise the limit to 1000. It should be adequate as every successful connection will reflush the counter. In principal, it can happen to any ip, no matter it's within jlab or tunnel through firewall. refer to http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html

clas12 server

As GEMC is built for clas12 initially, we still take clas12 database as a reference.

The database server currently used is clasdb.jlab.org. The user name is clasuser with no password which has read and write privilege.

On the server, there are many databases. "clas12_geometry" and "clas_banks" are used for official clas12 detector. "user_geometry" and "user_banks" are used for user modified geometry and banks

mysqlcc, a gui tool to view clasbd which runs the 4x version mysql server http://hallaweb.jlab.org/12GeV/SoLID/download/mysqlcc-0.9.4-linux-glibc23.tgz