currently I'm facing problems to connect my Software API Gateway 9.2 to my locally installed MySQL Server 5.5 on CentOS.
I installed successfully the Gateway and configured successfully the embedded database. After that I would like to change to a MySQL database.
I installed the database locally. Secured the mysql database with the command mysql_secure_installation. I created a database with a name ssg. ( I tried also to not create the database ssg, but this causes to an error as well. ) After that I tried to configure the Gateway via the setup.sh script, choosed Option 2.
But if I wanted to save my configure I received an error "Unable to connect to database".
As the user for connecting, I used the administrative user root. (The MySQL started successfully.)
In the config.log I found the following error:
[2017/12/03 at 18:12:10] - [INFO]: Processing configuration.[2017/12/03 at 18:12:10] - [INFO]: Processing 0 databases.[2017/12/03 at 18:12:36] - [INFO]: Configuring node in directory '/opt/SecureSpan/Gateway/node/default/etc/conf'.[2017/12/03 at 18:12:36] - [WARNING]: Error while checking the version of the ssg in the database: Table 'ssg.ssg_version' doesn't exist
I have no idea what's going wrong? Any idea would by appreciate.
Does the user who is connecting to sql have permissions?
select user,host from mysql.user;
yes I think so because, I‘m using the MySQL root user.
Gesendet: Montag, 4. Dezember 2017 17:18
An: Krüger <email@example.com>
Betreff: Re: - Re: MySQL Connection Problem
<https://communities.ca.com/?et=watches.email.thread> CA Communities
Re: MySQL Connection Problem
reply from Seenu Mathew <https://communities.ca.com/people/Seenu_Mathew?et=watches.email.thread> in CA API Management Community - View the full discussion <https://communities.ca.com/message/242026756-re-mysql-connection-problem?commentID=242026756&et=watches.email.thread#comment-242026756>
I understand that you have mysql on the same machine. Then you use the ./setup.sh script and choose option 2 to configure the gateway.
You are asked to enter the database connection and you choose YES
It asks you for the hostname. Is there a hostname resolution for this machine in the /etc/hosts file?
Then it asks you for the credentials for the database. What do you put in here?
Are you able to use these same credentials to login to mysql? (ex: mysql -u <username> -p)
I suggest a support case be raised if these are checked correctly for further troubleshooting.
The error you are seeing is due to the fact that you are trying to re-configure a Gateway that was already configured, so you don't have the option to "create" a new database. It's simply connecting to MySQL and expecting an ssg database to exist, which it doesn't.
What you'll want to do is the following:
1. From the root prompt, we want to rename node.properties to convince the Gateway that it is not already configured:
cd /opt/SecureSpan/Gateway/node/default/etc/confmv node.properties node.properties.bak
2. Now we will want to configure the Gateway from the menu again.
cd /opt/SecureSpan/Gateway/runtime/bin/sh setup.shSelect 'Option 2'
You should now be prompted with a slightly different set of questions, instead of a sub-menu, which indicates that it is treating it as a new configuration, and thus will allow you to connect to MySQL and create a new ssg database. Let me know if that does the trick.
thanks for your help this solved my problem.
I am trying to install a fresh Gateway and all details I input however I am getting the error saying the host is not allowed to connect to the MySQL. I dont know what could be the issue. Any suggestions please?