ODBC Support for MySQL on cPanel Premium Hosting
Article Information
Article ID: KB-ODBC-001
Last Updated: August 12, 2025
Difficulty Level: Beginner to Intermediate
Estimated Time: 5-10 minutes
Quick Answer
Yes, ODBC for MySQL is supported on iFastNet's cPanel Premium hosting. However, it requires manual activation through the PHP Selector and can only be used to connect to remote ODBC servers (not local servers hosted on the same hosting account).
What is ODBC?
ODBC (Open Database Connectivity) is a technology that allows your website or application to connect to databases that are hosted on different servers or systems. Think of it as a "bridge" that lets your website talk to databases that aren't directly on your hosting account.
Important Limitation: On shared hosting, ODBC can only connect to external/remote databases - it cannot connect to ODBC servers running locally on the same hosting server.
Before You Start
What You'll Need:
- iFastNet Premium cPanel hosting account
- Access to your cPanel control panel
- Details of the remote ODBC server you want to connect to
- Basic understanding of your application's database requirements
What ODBC Can Do:
- ? Connect to remote MySQL databases on other servers
- ? Connect to remote Microsoft SQL Server databases
- ? Connect to other external ODBC-compatible databases
What ODBC Cannot Do:
- ? Connect to local ODBC servers on the same hosting account
- ? Create ODBC servers on your hosting account
- ? Replace standard MySQL database connections for local databases
Accessing Your cPanel
Method 1: Through iFastNet Client Portal (Recommended)
- Open your web browser and navigate to: https://ifastnet.com/portal/clientarea.php
- Log in using your iFastNet account credentials
- Locate your hosting service from the services list
- Click on your hosting service to view details
- Click the "Login to cPanel" button
- cPanel will open in a new tab
Method 2: Direct cPanel Access
- Open your web browser and type: https://yourdomain.com/cpanel
- Replace "yourdomain.com" with your actual domain name
- Enter your cPanel username and password
- Click "Log in"
Need Help Accessing cPanel?
If you can't access your cPanel:
- Visit: https://support.ifastnet.com/login.php
- First time user? Click "Register" to create a support account
- Returning user? Log in with your support credentials
- Create a new support ticket explaining your access issue
Step-by-Step: Enabling ODBC Support
Step 1: Locate the PHP Selector
- Once in cPanel, look for the "Software" section
- Find and click on "Select PHP Version"
- This might also be labeled as "PHP Selector" or "CloudLinux PHP Selector"
- Look for an icon that resembles a gear or settings symbol
Can't Find It? Try looking in these sections:
- Software
- Advanced
- Programming Languages
Step 2: Access PHP Extensions
- In the PHP Selector page, you'll see your current PHP version displayed
- Look for a tab or button labeled "Extensions"
- Click on "Extensions" to view available PHP modules
Step 3: Enable ODBC Extension
- Scroll through the list of extensions until you find "odbc"
- Look for a checkbox next to "odbc"
- Click the checkbox to enable it - you should see a checkmark appear
- The change is automatically saved - no additional save button needed
What You Should See:
- ? A checkmark next to "odbc" indicating it's enabled
- The extension status should show as "enabled" or "active"
Step 4: Verify ODBC is Enabled
- Stay in the Extensions section
- Confirm the "odbc" checkbox is checked
- Optional: Create a simple PHP info file to verify (see verification section below)
Verifying ODBC Installation
Method 1: Check Extensions List
- Return to the PHP Selector Extensions page
- Verify "odbc" shows as enabled/checked
- Note your current PHP version for reference
Method 2: Create PHP Info File (Advanced Users)
- In cPanel, go to File Manager
- Navigate to your public_html folder
- Create a new file called "phpinfo.php"
- Add this content:
<?phpphpinfo();?>
- Visit yourdomain.com/phpinfo.php in your browser
- Search for "odbc" on the page - you should see ODBC information
- Delete the phpinfo.php file after checking (for security)
Using ODBC in Your Applications
Important Connection Requirements
When using ODBC in your PHP applications, remember:
? Supported Connections:
- Remote MySQL servers with ODBC drivers
- External Microsoft SQL Server databases
- Third-party database services with ODBC support
? Not Supported:
- Local ODBC servers on the same hosting account
- Creating ODBC data sources on the server
- Direct server-to-server ODBC within the hosting environment
Basic PHP ODBC Connection Example
<?php
// Example connection to remote ODBC database
$connection_string = "DRIVER={MySQL ODBC 8.0 Driver};SERVER=remote-server.com;DATABASE=database_name;UID=username;PWD=password;";
$connection = odbc_connect($connection_string, '', '');
if ($connection) {
echo "ODBC connection successful!";
// Your database operations here
odbc_close($connection);
} else {
echo "ODBC connection failed.";
}
?>
Note: Replace the connection details with your actual remote database information.
Common Use Cases
When to Use ODBC
? Good Use Cases:
- Connecting to corporate databases hosted elsewhere
- Integrating with third-party services requiring ODBC
- Accessing legacy database systems
- Connecting to cloud-based database services
? When NOT to Use ODBC:
- Standard website databases (use regular MySQL instead)
- Local database connections on the same server
- Simple web applications with basic database needs
Troubleshooting
Problem: Can't Find "Select PHP Version"
Solution:
- Check if you have Premium hosting (ODBC requires Premium)
- Look in different cPanel sections (Software, Advanced)
- Contact support if still not visible
Problem: ODBC Extension Not Available
Possible Causes:
- You may not have Premium hosting
- Server configuration may not support ODBC
- PHP version may not have ODBC compiled
Solution: Contact iFastNet support for verification
Problem: ODBC Connections Failing
Check These Items:
- Remote server allows connections from your hosting server
- Connection string is correctly formatted
- Remote database credentials are correct
- Firewall settings allow the connection
Problem: "Function not found" Errors
Solution:
- Verify ODBC extension is actually enabled
- Check if you're using the correct ODBC function names
- Ensure your PHP version supports the ODBC functions you're using
Important Limitations and Considerations
Server Limitations
- Shared hosting environment: Resource usage is monitored
- Connection limits: May be restricted for performance
- Timeout limits: Long-running connections may be terminated
Security Considerations
- Remote connections: Ensure your remote database is properly secured
- Credentials: Never hardcode database passwords in your scripts
- Firewall: Remote server must allow connections from your hosting IP
Performance Considerations
- Network latency: Remote connections are slower than local ones
- Connection pooling: Not available in shared hosting
- Resource usage: ODBC connections consume more resources
Getting Additional Support
When to Contact Support
Contact iFastNet support if you experience:
- Cannot locate the PHP Selector in cPanel
- ODBC extension is not available in the extensions list
- Enabled ODBC but functions still not working
- Need assistance with remote database connection configuration
How to Contact Support
- Visit: https://support.ifastnet.com/login.php
- New users: Click "Register" to create a support account
- Create a new ticket with these details:
- Your domain name
- Current PHP version
- Description of the issue
- What you're trying to connect to (without sensitive details)
- Any error messages you're receiving
Information to Include in Support Tickets
Always Include:
- Domain name
- Hosting plan type (should be Premium)
- PHP version you're using
- Specific error messages
- What you're trying to accomplish
Never Include:
- Database passwords
- Sensitive connection details
- Personal or confidential information
Frequently Asked Questions
Q: Does this work on all hosting plans?
A: ODBC support is available on Premium cPanel hosting plans. Basic or shared plans may not have this feature.
Q: Can I install my own ODBC drivers?
A: No, you cannot install custom ODBC drivers on shared hosting. You can only use the drivers already installed on the server.
Q: Is there a cost for enabling ODBC?
A: No additional cost - ODBC support is included with Premium hosting plans.
Q: Can I connect to Microsoft Access databases?
A: Potentially yes, if the Access database is accessible via ODBC from a remote server. However, this is not commonly supported in web environments.
Q: What's the difference between ODBC and regular MySQL connections?
A: Regular MySQL connections are for databases on the same server. ODBC is for connecting to databases on different servers or systems.
Conclusion
ODBC support is available on iFastNet's Premium cPanel hosting and can be easily enabled through the PHP Selector. While it's a powerful tool for connecting to remote databases, remember that it's specifically designed for external connections and cannot be used for local ODBC servers.
Key Takeaways:
- ? ODBC is supported on Premium hosting
- ? Enable it through Select PHP Version ? Extensions
- ? Only works with remote ODBC servers
- ? Useful for integrating with external database systems
For most standard website applications, regular MySQL databases hosted on your account will be more appropriate and performant than ODBC connections.