Project

General

Profile

Database server setup

Added by Michael Cianfrocco over 10 years ago

Hello,

We have successfully installed the websever, database server, and appion on a single workstation, and now we would like to extend this across multiple workstations in the lab. What is the appropriate way to go about settings up the database?

I've already created usr_object@'localhost' on the localhost (the computer that runs the database and webserver) and also created usr_object@'%' for all computers within our network on the localhost. Do I need to start mysql individually on each workstation and then create the user usr_object@'aida.mcb.harvard.edu' (where aida.mcb.harvard.edu is the IP address for the database server)? Or do I just create usr_object@'%'?

I know this is a simple question, but I'm still learning MySQL so I appreciate your patience!

Thanks!
Mike


Replies (3)

RE: Database server setup - Added by Michael Cianfrocco over 10 years ago

I should also say that I've granted all users updating privileges to ap* project databases using the command:

GRANT ALTER, CREATE, INSERT, SELECT, UPDATE ON `ap%`.* to usr_object@'%';

And I get the following error message when I try to run an appion command on a machine other than the database host:

sinedon.dbdatakeeper.DatabaseError: Access denied for user 'usr_object'@'%' to database 'projectdb'

RE: Database server setup - Added by Anchi Cheng over 10 years ago

Michael,

MySQL keeps its own user and password which is independent of your login user. In addition, on the remote
computers only a mysql client needs to be running not the server. Therefore, you won't need to start MySQL server on them,
nor doing any of the things in Database_Server_Installation They are only performed on the server itself.

Regarding access denied error:

First, check your my.cnf on the MySQL server as in Database_Server_Setup_to_allow_connection_from_the_instruments

Second, try a connection without sinedon first from your machine other than the database host to like this:

mysql -h your_database_host -u user_object -p projectdb

The socket port for MySQL can also be found in /etc/my.cnf, and is normally opened but it might not be true.

RE: Database server setup - Added by Michael Cianfrocco over 10 years ago

Hi Anchi,

Thank you for your response - after looking back into my installation, I realized that I was missing permissions for project and leginon databases from the database host computer. Now it all works!

mike

    (1-3/3)