Difference between revisions of "Solid mysql database"
(→ssh tunnel to access the server) |
(→ssh tunnel to access the server) |
||
Line 36: | Line 36: | ||
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 | + | then test the connection with |
+ | |||
+ | mysql -h 127.0.0.1 -u soliduser -pilovesolid | ||
+ | (somehow hostname localhost doesn't work for mysql, make sure to use 127.0.0.1 instead) | ||
+ | |||
+ | If you see the connection is made, then you are all set. The mysql command to host 127.0.0.1 will be redirect to soliddb.jlab.org. You can then use 127.0.0.1 in place of soliddb.jlab.org when specifying GEMCHOST | ||
==a problem and fix== | ==a problem and fix== |
Revision as of 16:02, 14 May 2011
Contents
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"
database name
On the server, two groups of database "geometry" and "banks" 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" "user_geometry_ec" and "user_banks_ec" "user_geometry_cc" and "user_banks_cc" "user_geometry_gem" and "user_banks_gem" "user_geometry_baffle" and "user_banks_baffle" are used for user modified geometry/field and banks
"test" for test
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 test the connection with
mysql -h 127.0.0.1 -u soliduser -pilovesolid (somehow hostname localhost doesn't work for mysql, make sure to use 127.0.0.1 instead)
If you see the connection is made, then you are all set. The mysql command to host 127.0.0.1 will be redirect to soliddb.jlab.org. You can then use 127.0.0.1 in place of soliddb.jlab.org when specifying GEMCHOST
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