no connection to database

A couple of weeks ago I setup two machines on a network, one running the database, the other was able to run a server, and client tools, just by correctly setting TANGO_HOST, MYSQL_USER, MYSQL_PASSWORD. Everything in the garden was rosy!!!

Now I have a new situation - two new machines, each of which has two network interfaces (this may have nothing to do with my problem):

Machine A - RHEL6.7 eth0 131.169.93.xxx, eth1 192.168.1.150

machine B - Ubuntu eth0 192.168.1.170, eth1 not used (no IP addr, no cable)

TANGO_HOST=192.168.1.150:10000

Database runs on machine A, severs and client tools on machine A work.

Machine B cant connect to database either servers, or clients
for instance jive:
"Connection to database failed !,
"Origin -> connect_to_database(192.168.1.150,10000)

I notice that sqladmin from either machine fails when I set user,password, host.

on 170: error: 'Can't connect to MySQL server on '192.168.1.150' (113)'

on 150 error: 'Host '192.168.1.150' is not allowed to connect to this MySQL server'

on 150 again : mysqladmin –user=root –password=tango –host=localhost status …… works!!!

I don't know if this is relevant to my tango problem ???

Of course network (ssh etc) between the two machines work fine.

So perhaps remote user permissions on the database???
Steve,

I think your problem is indeed the connection to Mysql. The Database server needs to have the password and user set for this to work. One way of doing this is to specify there in the environment variables in the shell where you will start the Database server. The environment variables in question are MYSQL_USER and MYSQL_PASSWORD. If you are starting the script using the tango-db startup script then you must add them to the beginning of this script.

Andy
Edited 8 years ago
Hi Andy,

It is more subtle than that. I indeed have the MYSQL_USER and MYSQL_PASSWORD set. And I have had the same setup working before in my office, but with the same OS and a single network interface on both machines.

Anyway, I have put the database now on the Ubuntu machine, so I can continue development. I will now see if the connection works in the other direction. If not I will reconfigure both machines to have a single network interface. But that may wait until I have the device server working.

Steve

Steve,

the error message :
"Connection to database failed !,
"Origin -> connect_to_database(192.168.1.150,10000)
is a pure MySQL connection problem. I don't see how the network interfaces interfere with this.
Maybe MYSQL_USER and MYSQL_PASSWORD work differently under RHEL. Strange. Have you checked the output from the Database server on the command line? Try starting it by hand and see if it can connect.

Andy
Yes, certainly SQL issue, as I said in my original post sqladmin does not work either- I will have to look at this more later, now back to device servers :)
 
Register or login to create to post a reply.