DCSS uses the mysql database to determine which users are allowed to user the beam line.
beamline_configuration database:
bl921:~ > /usr/local/mysql/bin/mysql -u admin -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 354856 to server version: 3.22.32 Type 'help' for help. mysql> use beamline_configuration Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> grant select on DCSS to dcss@blctlxx.slac.stanford.edu; mysql> grant select on Users to dcss@blctlxx.slac.stanford.edu; mysql> grant select on Beamlines to dcss@blctlxx.slac.stanford.edu; Query OK, 0 rows affected (0.17 sec) mysql> flush privileges; Query OK, 0 rows affected (0.55 sec) mysql>
BeamlineID.
mysql> select * from Beamlines where id=12; +----+-------+ | id | Name | +----+-------+ | 12 | bl-xx | +----+-------+ 1 row in set (0.02 sec)
mysql> select * from DCSS where id=12; +----+---------------------------+---------------+---------------+------------+----------+ | id | HostName | ListeningPort | MemoryMapFile | BeamlineID | beamline | +----+---------------------------+---------------+---------------+------------+----------+ | 12 | blctlxx.slac.stanford.edu | 14242 | database.dat | 12 | bl-xx | +----+---------------------------+---------------+---------------+------------+----------+ 1 row in set (0.00 sec)
Note: The ListeningPort entry in this not used by DCSS, because DCSS gets its port assignments from the 'serverPorts.txt' as described in configuring DCSS's server ports. However, the standard SSRL DHS actually does look into this table and grabs this value to determine which host and port it should connect to. Therefore, this Listening port should be the same value as the 'hardwarePort' as described in the serverPorts.txt file. Obviously there is some clean up needed here.
beamline field should
either match the name of the beamline field in the DCSS table or the entry could
be ALL, which would give the user access to all of the defined beamlines. The
priv field is not used anymore and will be deleted in future release.
mysql> select * from Users; +----+-----------+------+------------------+--------------+---------------+----------+-------+--------------+---------+ | id | unix_name | priv | real_name | office_phone | job_title | beamline | staff | remoteAccess | enabled | +----+-----------+------+------------------+--------------+---------------+----------+-------+--------------+---------+ | 1 | scottm | 4 | Scott McPhillips | 9-714-xxxx | S/W Developer | ALL | y | Y | Y | +----+-----------+------+------------------+--------------+---------------+----------+-------+--------------+---------+ 1 row in set (0.00 sec)