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
DataBaseds 2 -ORBendPoint giop:tcp::10000
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.
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.
I think your advice is in the right direction. With the host line I get:
[jr@localhost]$ mysql -D tango
ERROR 2005 (HY000): Unknown MySQL server host 'localhost:10000' (110)
After I remove it:
jr@localhost]$ mysql -D tango
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.7.18 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show tables;
+--------------------------------+
| Tables_in_tango |
+--------------------------------+
| access_address |
| access_device |
| attribute_alias |
| attribute_class |
| class_attribute_history_id |
| class_history_id |
| class_pipe_history_id |
| device |
| device_attribute_history_id |
| device_history_id |
| device_pipe_history_id |
| event |
| object_history_id |
| property |
| property_attribute_class |
| property_attribute_class_hist |
| property_attribute_device |
| property_attribute_device_hist |
| property_class |
| property_class_hist |
| property_device |
| property_device_hist |
| property_hist |
| property_pipe_class |
| property_pipe_class_hist |
| property_pipe_device |
| property_pipe_device_hist |
| server |
+--------------------------------+
28 rows in set (0.00 sec)
But now the ‘Tango Database server’ gives this:
jr@localhost]$ tango start
Starting TANGO database
Starting TANGO Database Server
main(): arrived
main(): export DataBase as named servant (name=database)
Received a CORBA::Exception
Tango exception
Severity = ERROR
Error reason = DB_DeviceNotDefined
Desc : device dserver/databaseds/2 not defined in the database !
Origin : DataBase::ExportDevice()
Exiting
Failed to start Tango database server
[jr@localhost]$ mysql -D tango
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.18 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show tables;
+--------------------------------+
| Tables_in_tango |
+--------------------------------+
| access_address |
| access_device |
| attribute_alias |
| attribute_class |
| class_attribute_history_id |
| class_history_id |
| class_pipe_history_id |
| device |
| device_attribute_history_id |
| device_history_id |
| device_pipe_history_id |
| event |
| object_history_id |
| property |
| property_attribute_class |
| property_attribute_class_hist |
| property_attribute_device |
| property_attribute_device_hist |
| property_class |
| property_class_hist |
| property_device |
| property_device_hist |
| property_hist |
| property_pipe_class |
| property_pipe_class_hist |
| property_pipe_device |
| property_pipe_device_hist |
| server |
+--------------------------------+
28 rows in set (0.00 sec)
mysql> SELECT server FROM device WHERE name LIKE 'dserver/databaseds/2';
Empty set (0.00 sec