Direct MySQL access
NoTouch Center uses a database to store its data, most notably information about clients and their configuration settings, status values and peripheral inventory information. By default, an instance of MySQL is used - it comes as part of NComputing Virtual Appliance as well as the NoTouch Center Windows Installer.
It is possible to connect to this MySQL directly, for instance to use ODBC-based reporting tools or to develop your own templates for the Reports module. Furthermore, if you have decided to use a custom database, you can of course open up access to that database as well.
WARNING: Improper writes to the database can mess up NoTouch Center and disrupt functionality.
NOTE: We do not officially support this. Use this information at your own risk. Your mileage may vary.
Default database credentials and connection information
This is the login information:
- Database name: easyadmin
- Username: easyadmin
- Password: easyadmin
However, without following the steps outlined below, you would not be able to log in.
Allowing access to the database
- Log in to the NComputing Virtual Appliance command shell using SSH and gain root privileges.
- MySQL interface binding. MySQL does not listen on the (virtual) Ethernet port. You need to change the bind-address setting to 0.0.0.0 in
/etc/mysql/my.cnf, otherwise there is no way an external system could reach through to MySQL. So, change this line
bind-address = 127.0.0.1
bind-address = 0.0.0.0
- Now restart MySQL. Back on the shell prompt, type:
- Firewalling. Post-August-2014 builds of our VA code use an iptables based firewall. You may need to edit
/etc/iptables/rules.v4and create a line for TCP port 3306 (simply copy the line for port 80 and exchange 80 by 3306). Without that modification, the kernel won't let packages through, even when MySQL is listening on the port. So, make sure the following line gets inserted into the file, before or after the similar-looking line for port 80.
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
- Now load the new firewall rules by restarting the iptables-persistent service:
service iptables-persistent restart
- Database user. The standard MySQL easyadmin user is configured to be allowed only when connecting from localhost. So, you need to set this up also: Execute this command on the shell:
mysql -u root --password=admin
- On the MySQL prompt enter this command:
grant select on easyadmin.* to 'easyadmin'@'%' identified by 'easyadmin';
- MySQL will reply with:
Query OK, 0 rows affected (0.00 sec)
- Note:You may replace "select" by "all privileges" if you want to allow arbitrary SQL commands to be made. Also, you may replace the % character by an IP address such as 192.168.1.1 to allow connects only from 192.168.1.1.
- After that, exit MySQL with "quit" and log out from the SSH connection.
After configuring these layers of extra security you should be able to connect with ODBC tools or similar database clients.