How to import a MySQL database using debug access
2 min read
Updated 20 hours ago
Importing a MySQL database using debug access
Debug access allows you to connect directly to your MySQL database from outside the platform for maintenance tasks like importing data. This feature provides temporary external access to your database service.
Enabling debug access
- Navigate to your application in the dashboard
- Go to the "Services" section
- Find your MySQL service and click the menu icon (three dots)
- Select "Enable debug access"
- Choose a duration (up to 6 hours)
Once enabled, you'll see connection details including:
- Host: External IP address
- Port: Randomly assigned port number
- Username: Your database username
- Password: Your database password
- Database: Your database name
Importing your database
With debug access enabled, you can import your MySQL database using standard MySQL tools:
Using mysql command line
mysql -h [HOST] -P [PORT] -u [USERNAME] -p[PASSWORD] [DATABASE] < backup.sql
Replace the placeholders with your actual connection details from the debug access modal.
Using MySQL Workbench
- Open MySQL Workbench
- Create a new connection using the debug access details
- Connect to the database
- Use "Data Import/Restore" to import your SQL file
Using phpMyAdmin or similar tools
You can connect any MySQL client tool using the provided connection details. The connection URL format is:
mysql://[USERNAME]:[PASSWORD]@[HOST]:[PORT]/[DATABASE]
Important notes
- Debug access automatically expires after the selected duration (maximum 6 hours)
- The external port is randomly assigned for security
- Always use secure connections when transferring sensitive data
- Debug access should only be used for maintenance tasks
- The connection details are displayed in a modal with copy buttons for convenience
Security considerations
- Debug access creates a temporary external service with a random port
- Access is time-limited and automatically expires
- Only enable debug access when actively performing maintenance
- Disable debug access immediately after completing your import
Troubleshooting
If you're having trouble connecting:
- Verify you're using the correct port number (not the default 3306)
- Ensure your firewall allows outbound connections to the host IP
- Check that debug access hasn't expired
- Try copying the connection details directly from the modal to avoid typos