TANGO DB Error Reason=CANNOT_CONNECT_MYSQL
|
|
---|---|
Hi All I am facing problem for Step-1 - Running given in README. Following is the error thrown while executing main(): arrived Received a CORBA::Exception Tango exception Severity = ERROR Error reason = CANNOT_CONNECT_MYSQL Desc : Failed to connect to TANGO database (error = Access denied for user 'root'@'localhost' (using password: NO)) Origin : DataBase::init_device() Exiting Any Help Will be appreciated. Thanks Balkrishna |
|
|
---|---|
Hi Balkrishna, I presume this is the error you got when trying to run the DataBaseds device server. This server needs to connect to the mysql database which is probably password protected. You can check this by trying to run the command line client mysql : "mysql tango". The user and password is the one you specified when installing mysql and which you also gave again when doing the tango installation. The username and password are required to be passed as environment variables MYSQL_USER and MYSQL_PASSWORD. You can either do this and try running In the above example the port number is set to 10000 which means you need to specify TANGO_HOST=localhost:10000 for TANGO servers and clients to connect to it.The environment variables are automatically picked up by the tango_dbase system V startup script via this file: /var/lib/tango/.my.cnf (at least on Debian systems) i.e. the ones defined in your shell are ignored when using tango_dbase to start the database server. More info here: http://www.esrf.eu/computing/cs/tango/tango_doc/kernel_doc/ds_prog/node14.html |
|
|
---|---|
Hello, somehow with this command:
I manage to get all the configurations right:
But when I start the tango process, it keeps trying to access the DB with my own user (I think):
I have ~/.my.cnf like this:
Any other clue why? (I am in a Centos 7) R, J. |
|
|
---|---|
Can you try to remove the line containing host in your ~/.my.cnf file? I think there is a confusion here between the Tango Database server, which is a Tango device server which should probably listen on the port 10000 (if we manage to make it start) of your machine and the MySQL server, which is probably listening on another port. Can you connect to your MySQL database using command?Cheers, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Yes, I think your advice is in the right direction. With the host line I get:
After I remove it:
But now the 'Tango Database server' gives this:
|
|
|
---|---|
From mysql client tool, could you please execute the following SQL statement?
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Empty
|
|
|
---|---|
Interesting… It looks like you encountered a problem during the Tango database creation. Could you please try:
If this returns an empty set, I would suggest to remove the Tango database
and compile again the distribution… Kind regards, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Yes, That solved it. Thanks a lot. |