Database Server Setup to allow connection from the instruments » History » Revision 6
Revision 5 (Anchi Cheng, 01/06/2014 01:59 PM) → Revision 6/16 (Anchi Cheng, 01/06/2014 02:01 PM)
h1. Database Server Setup to allow connection from the instruments You need to do is even if you have used autoinstaller so that computers controlling the instruments (microscope/camera) can connect to the database h2. Bind mysqld to its IP address to allow tcp connection to it. h3. Edit /etc/my.cnf search for *skip-networking* and make sure it is commented out like this: <pre> #skip-networking </pre> Add the address the database is bound to after that line. For example, 192.168.0.1 in a local network line <pre> #skip-networking bind-address=your.ip.address.number </pre> for example, 192.168.0.1 in a local network h3. Restart mysqld For CentOS, Fedora <pre> sudo /etc/init.d/mysqld restart </pre> or <pre> sudo /sbin/service mysqld restart </pre> h3. Create remote user Create and grant privileges to the usr_object for the databases on the hosts involved. See MySQL Reference Manual for details. You can set hosts on a particular subnet by only specify the network number portion such as '192.168' and use wild card for the host number portion to give '192.168.%.%' as the global host allowing connection. If appropriate, you can also use domaian name with wild care i.e., '%.mydomain.edu' At the mysql prompt execute the following commands: <pre> CREATE USER usr_object@'192.168.%.%' IDENTIFIED BY 'YOUR PASSWORD'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leginondb.* TO usr_object@'192.168.%.%'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON projectdb.* TO usr_object@'192.168.%.%'; </pre> h3. Change localhost database user to usr_object if autoinstaller was used. Autoinstaller does not create usr_object user on the localhost but use root user for database connection. You may want to make change at this time. At the mysql prompt execute the following commands: <pre> CREATE USER usr_object@'localhost' IDENTIFIED BY 'YOUR PASSWORD'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON leginondb.* TO usr_object@'localhost'; GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON projectdb.* TO usr_object@'localhost'; </pre> ______ [[Web Server Installation|< Web Server Installation]] | [[Additional Database Server Setup after Web Server Installation| Additional Database Server Setup >]] ______