Connecting to SME Server's MySQL Server using DBTools



Step 1. Download and install DBManager Professional
http://www.dbtools.com.br/EN/dbmanagerpro.php

Step 2. Use PuTTY to create a tunnel over SSH on port 3306.
Use this howto (Thanks Tom Carroll): http://www.carrollweb.net/putty/putty-howto.html
In steps 13 and 14, substitute port 3306 for port 980.

Your Tunnel config screen should look similar to the image below:





Step 3. Once connected to your SME Server, you'll need to create a privileged user on the MySQL Server.
#>mysql
mysql> GRANT ALL PRIVILEGES on *.* to YOUR_USERNAME@localhost IDENTIFIED BY 'YOUR_SECRET_PASSWORD';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
#>

Step 4. Open up DBManager on your workstation.





Step 5. Open the Server Manager, by clicking the button in the upper left corner.

Step 6.  You should see this screen

Step 7.  Click the icon in the upper left to Add a Server.  
     Enter whatever you want as the ServerName.
     Change Hostname to "localhost".  Enter the MySQL Username/Password that you created above.
     Click the diskette icon to save the settings

Step 8.  Highlight your new server and click the lightening bolt icon to test the connection.  You should see:

Step 9.  Click OK, then close the ServerManager.  Click Yes to reload servers. 

Step 10.  Double-click on your new server.  It should connect and display a few settings for your database server

Step 11.  You are now free to create databases, create tables, users, anything you can think to do on a database server.

Step 12.  You might want to Import existing databases into the system (MS Access and others).  Click  Tools -> Data Management -> Import/Export Wizards

 

 

Notes:
I have had reports (and personal experience) that the methods outlined here don't always work on SME v6.x. On SME 6.x, I believe you will need to run the following commands:
      | # /sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no
      | # /sbin/e-smith/expand-template /etc/my.cnf
      | # /sbin/service mysqld restart

Feedback welcome.

Abe Loveless - abe_AT_lovelesscentral.org
Date:  January 30, 2004