Our web hosting services support both MySQL and MariaDB. Windows services currently offer MySQL 5.7. Linux services currently offer MariaDB 10.1. MariaDB 10.1 is comparable to MySQL 5.6 in terms of core binary compatibility. MySQL and MariaDB are also supported with our Hyper-V services as an addon. These standardized versions ensure stable, secure database operations across shared environments where the provider manages the server infrastructure.
Application developers must align their SQL code, connectors, and configuration with the exact database version in production. Mismatches can produce syntax errors, missing features, or unexpected query plans. In shared hosting, customers cannot upgrade or downgrade the server version independently, making upfront verification essential before deployment. The selected versions balance legacy application support with modern security requirements.
#Database Versions by Platform
The database engine and version are determined by the operating system of the hosting service. All Windows-based shared plans standardize on one version, while Linux-based plans standardize on another. This separation allows optimization for each platform's common application stack.
- Windows services currently offer MySQL 5.7, which integrates natively with .NET applications through official connectors and supports classic ASP via ODBC.
- Linux services currently offer MariaDB 10.1, serving as the default for PHP applications including those that expect MySQL-compatible behavior.
- Hyper-V services treat MySQL or MariaDB as an optional addon, installed and configured according to the specific virtual server requirements.
#Core Compatibility Between MariaDB and MySQL
MariaDB 10.1 maintains core binary compatibility with MySQL 5.6. This includes on-disk data format, table structures, and fundamental SQL syntax. Applications developed against MySQL 5.6 typically run on MariaDB 10.1 with little or no modification. However, differences exist outside the core: MariaDB includes additional storage engines and server variables, while MySQL 5.7 adds JSON support and stricter default SQL modes that may require query adjustments when moving between the two.
When migrating an existing database, export and import operations usually succeed due to the compatibility layer. Test all stored procedures, triggers, and views after migration. Pay particular attention to any reliance on features introduced after MySQL 5.6 or on MariaDB-specific extensions.
#Connecting Applications to the Database
Connection parameters are provided in the hosting control panel after database creation. Within the shared hosting network, use localhost or the internal hostname for optimal performance and security. Never expose database credentials in client-side code. Prefer environment-specific configuration files that can be excluded from version control.
#.NET Connection Example on Windows
using MySql.Data.MySqlClient;
string connectionString = "server=localhost;user=your_db_user;database=your_database;password=your_password;port=3306;";
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
conn.Open();
// Execute commands here
MySqlCommand cmd = new MySqlCommand("SELECT 1", conn);
cmd.ExecuteNonQuery();
}
#PHP Connection Example on Linux
<?php
$mysqli = new mysqli('localhost', 'your_db_user', 'your_password', 'your_database');
if ($mysqli->connect_error) {
die('Connect Error: ' . $mysqli->connect_error);
}
echo 'Connected successfully to MariaDB 10.1';
$mysqli->close();
?>
#Common Pitfalls and Best Practices
- Do not assume every MySQL 5.7 feature is present in MariaDB 10.1 or vice versa; validate behavior during development.
- Review SQL mode settings, as MySQL 5.7 defaults are stricter and may reject queries tolerated by earlier versions.
- Use prepared statements to mitigate SQL injection regardless of the underlying engine version.
- Monitor error logs in the control panel for warnings about deprecated syntax before they become fatal errors.
- When using ORM libraries, confirm that the database driver matches the server version to avoid translation issues.
Verify the running database version directly from your application with a SELECT VERSION() query during initial setup. Align all development and testing environments to the same major version to reduce deployment surprises. For detailed steps on creating databases, users, or importing data within the control panel, consult the hosting account documentation. This disciplined approach prevents the majority of version-related failures in production.
Comments
No comments yet