Getting started with MySQL and MariaDB
Using Your Databases
Using Your Databases
Last updated 29th June 2022
Do you want to use MySQL or MariaDB for your databases?
MySQL is a relational database management system developed for increased read performance, unlike other systems.
This is an open-source engine, whose parent company is Oracle.
MariaDB is a derivative (fork) of MySQL.
This engine is 100% compatible, and is "freer" than its sibling MySQL. All the bugs and roadmaps are freely accessible, unlike the Oracle version. In addition, the storage database InnoDB has been replaced by XtraDB and other optimisations, promising performance gains.
Find out how to create and manage your MySQL or MariaDB databases
Please note that this service does not give you access to the Host but to the databases hosted on the Host. Generic SQL commands work with no issues, and HeidiSQL or SQuirreL SQL software is fully compatible.
As MariaDB is a fork of MySQL, the different commands are the same for the 2 types of database.
To log in to your database, make sure that you have:
All this information is available in the OVHcloud Control Panel.
Please also read our guide on getting started with the CloudDB service.
mysql --host=server --user=user --port=port --password=password database_name
1. <?php 2. $db = new PDO('mysql:host=host;port=port;dbname=dbname', 'username', 'password'); 3. ?>
Aliases, then on
You will now be connected to your database:
You can use phpMyAdmin to explore the contents of your database. To do this, install phpMyAdmin on your own server or web hosting plan. During this installation, make sure that the information on your CloudDB server and the database you want are correctly configured so that phpMyAdmin can connect to it.
mysqldump --host=server --user=user --port=port --password=password database_name > database_name.sql
cat database_name.sql | mysql --host=server --user=user --port=port --password=password database_name
In some cases, the RAM available in your CloudDB instance may not be sufficient to perform the desired export or import. If this is the case, we recommend using the OVHcloud tool in the OVHcloud Control Panel. See the Getting started with CloudDB service documentation if necessary.
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.Discuss with the OVHcloud community