Connecting to a Database
Introduction
This tutorial will walk you through connecting to a MySQL database in DBWillow, whether it's local, remote, or behind an SSH tunnel.
Prerequisites
- DBWillow installed
- MySQL server running
- Database credentials (username and password)
Local Database Connection
Step 1: Open Connection Dialog
- Launch DBWillow
- Click "New Connection" button
- Connection dialog appears
Step 2: Enter Connection Details
Fill in the form:
- Connection Name: "Local MySQL" (or any name)
- Host:
localhostor127.0.0.1 - Port:
3306(default) - Username: Your MySQL username (often
root) - Password: Your MySQL password
- Database: Leave empty or specify a database
Step 3: Test Connection
- Click "Test Connection"
- Wait for confirmation
- If successful, proceed to Step 4
- If failed, check credentials and server status
Step 4: Save and Connect
- Click "Save"
- Connection is saved
- DBWillow connects automatically
- You'll see the database schema
Remote Database Connection
Step 1: Gather Information
You'll need:
- Server IP address or hostname
- Port (usually 3306)
- Username and password
- Database name (optional)
Step 2: Configure Connection
- Host: Server IP or hostname
- Port:
3306(or custom port) - Username: Remote MySQL username
- Password: Remote MySQL password
- Database: Optional
Step 3: Test Connection
- Click "Test Connection"
- Verify connectivity
- Check firewall rules if connection fails
SSH Tunnel Connection
For databases behind firewalls:
Step 1: Enable SSH Tunnel
- Check "Use SSH Tunnel" in connection dialog
- SSH configuration appears
Step 2: Configure SSH
- SSH Host: SSH server address
- SSH Port: Usually
22 - SSH Username: Your SSH username
- Authentication: Password or private key
Step 3: Configure MySQL
- MySQL Host: Usually
localhost(through tunnel) - MySQL Port: Usually
3306 - Username: MySQL username
- Password: MySQL password
Step 4: Connect
- Click "Test Connection"
- SSH tunnel establishes
- MySQL connection through tunnel
- Save connection
Troubleshooting
Connection Refused
Possible causes:
- MySQL server not running
- Wrong port
- Firewall blocking
Solutions:
- Check MySQL service status
- Verify port number
- Check firewall rules
Access Denied
Possible causes:
- Wrong username/password
- User doesn't have permission
- Host restriction
Solutions:
- Verify credentials
- Check user permissions
- Verify allowed hosts
Timeout
Possible causes:
- Network issues
- Firewall blocking
- Server overloaded
Solutions:
- Check network connectivity
- Verify firewall rules
- Increase timeout in settings
Next Steps
Now that you're connected:
