LFC Mysql Remote Host
On the LFC server:
- Shutdown the running LFC catalog
# service lfcdaemon stop
- Shutdown and disable the MySQL database running on the LFC server:
# service mysql stop # chkconfig mysql off
The MySQL packages cannot be removed due to dependencies on the lcg-LFC_mysql metapackage, but they should definately be disabled.
Configure the MySQL server
On the MySQL server (N.B. you'll need 'root' access on the database):
- Copy the file /opt/lcg/share/LFC/create_lfc_tables_mysql.sql from the LFC server, then use it to create the Cns_db tables on the MySQL server:
mysql -u root -p < create_lfc_tables_mysql.sql
- Now allow the lfc user to connect to the cns_db database from the LFC server:
# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2877194 to server version: 3.23.58-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>use mysql; mysql>GRANT ALL PRIVILEGES ON cns_db.* TO ’lfc’@LFC_HOST IDENTIFIED BY ’lfc_password’;
In the above MySQL commands, lfc is the LFC user, LFC_HOST is the LFC server hostname and lfc_password should be the same string as the one setup in site-conf.def file for the LFC_DB_PASSWORD parameter.
Reconfigure the LFC Server
- On the LFC server, modify the /opt/lcg/etc/NSCONFIG file to contain:
i.e. replace the LFC_HOST, which YAIM setup, with MYSQL_HOST
- Restart the LFC server:
service lfcdaemon restart
- Having all the above in place, now create the /grid/VO structure from the LFC server: see LFC Admin Guide.
- Check that you can access the database from the LFC server:
LFC_SERVER# mysql -u lfc -h MYSQL_SERVER -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2877194 to server version: 3.23.58-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>use cns_db; mysql>show tables; ...
If access is not given, check the status of the lfc user in the db table of the mysql database (MySQL is rather picky about hostnames - I'd recommend using FQDNs).