Hosting Knowledge Base

Home » Knowledge Base » Control Panel » Advanced Tools » Database Manager

Knowledge Base

Database Manager

How can I create a MySQL database?

How to import a database?

How to export a database?

How can I edit my MySQL database?

How to connect remotely to my database (MySQL Workbench)?

My database is over quota

How can I increase my database quota?

How to access my MySQL/PostgreSQL database?

Can I use MySQL triggers? How can I create a MySQL database?

 

How can I create a MySQL database?

To create a database use the “Create MySQL Database” or “Create PostgreSQL Database” form and type the name and password of your new database. To finish the setup, click on the “Create Database” button.

 

How to import a database?

Importing a database can be accomplished in many ways, however, the easiest are through phpMyAdmin or SSH.

phpMyAdmin
The phpMyAdmin method requires you to access your database through the Control Panel -> Database Manager section and from the “All Databases” tab use the “phpMyAdmin” link available in the “Management” column for your database. Once you log into phpMyAdmin, select “Import” from the navigation pane and select your “Import” options, then click “Go”.

SSH
Before you connect with SSH, you need to create an SSH account. You can use the How to create an SSH account guide.
The SSH method requires you to first successfully connect through SSH (You can use the How to connect through SSH? guide) and then you can execute the following command to import your database:

mysql -h DB_HOST -u DB_USER -pDB_PASS DB_NAME < /home/www/database.sql

The variables DB_HOST, DB_USER, DB_PASS and DB_NAME should be replaced with the settings of your database and database.sql with the exact path to the .sql file you will be importing data from. You can find your database settings in your Control Panel -> Database Manager section, select “Options” for your database and choose the “Information” tab.

 

In case you receive an error during the import, stating that you do not have permissions to CREATE or USE this database, you should make some slight modifications to your database.sql file before you retry the import. You need to remove the CREATE DATABASE and USE commands at the first lines of your database.sql file. The lines in question are shown below. Be advised that for phpMyAdmin you need to remove the CREATE DATABASE line and update the USE line so it uses your MySQL user listed in the MySQL Manager section of your Control Panel.

−− CREATE DATABASE DB_NAME DEFAULT CHARACTER SET XXXX COLLATE XXXX;
−− USE DB_USER;

 

How to export a database?

The easiest way to export a database is through phpMyAdmin or SSH.

phpMyAdmin
The phpMyAdmin method requires you to access your database through the Control Panel -> Database Manager section and from the “All Databases” tab use the “phpMyAdmin” link available in the “Management” column for your database. Once you log into phpMyAdmin, select “Export” from the navigation pane and select your “Export” options, then click “Go”.

SSH
Before you connect with SSH, you need to create an SSH account. You can use the How to create an SSH account guide.
The SSH method requires you to first successfully connect through SSH (You can use the How to connect through SSH? guide) and then you can execute the following command to export your database:

mysqldump -h DB_HOST -u DB_USER -pDB_PASS DB_NAME > /home/www/database.sql

The variables DB_HOST, DB_USER, DB_PASS, and DB_NAME should be replaced with the settings of your database. You can find these settings in your Control Panel -> Database Manager section, select “Options” for your database and choose the “Information” tab. If you wish to export your database to a specific directory, replace database.sql with your desired exporting location.

 

How can I edit my MySQL database?

We offer phpMyAdmin for real-time online database management. You can access phpMyAdmin for your databases directly from the “Manage” column or through the Management tab from the Options column.

 

How to connect remotely to my database (MySQL Workbench)?

Remote connections to our database servers are restricted for security reasons. MySQL remote editing software like MySQL Workbench, Toad, etc cannot be used for database management. Please use the phpMyAdmin tool for MySQL (respectively phpPgAdmin for PostgreSQL), which is available in your Control Panel -> Database Manager section.

 

My database is over quota

You can check the disk space quota and current usage for a database from the “Quota” column in the control panel -> Database Manager.

To resolve this problem you can reduce the current disk space usage for your database or upgrade to a better hosting plan that includes higher quota.

  1. If your database is slightly over quota (5-10MB), you can go to your control panel -> Database Manager -> click “Options” for the given database -> select “Management” tab -> click “Optimize database”. This should operation removes unnecessary temporary files from your database and usually reduces the disk space usage. Please be advised that after the optimization process your database may take 1-4 hours to become operational again.
  2. If your database has gone over the disk space quota, you will need to upgrade your account to a hosting plan that includes higher MySQL quota. To check the current upgrade offers for your account, please go to your control panel -> Upgrade Services section.
  3. (Use this only if you know what you are doing) You can enter your database using phpMyAdmin as described in the How to access my MySQL/PostgreSQL database? and then delete the database records/tables you no longer need.

 

How can I increase my database quota?

If you wish to increase the quota for your MySQL database, you would need to upgrade your account to a better hosting plan. To view our hosting plans and their features, sign in to your web hosting account and go to: Buy Services > Upgrade Services.

How to access my MySQL/PostgreSQL database?

MySQL/PosgreSQL database connection can only be established with scripts or software hosted on your web hosting account. Remote access to our database servers is restricted due to security reasons.

When you use a script from your hosting account use the settings described in HERE.

For real-time online database management, we have made available phpMyAdmin and phpPgAdmin through the control panel. To manage your database with phpMyAdmin/phpPgAdmin, you must go to your control panel -> Database Manager and then click on the “Options” button for your database, select “Management” tab and then click on “phpMyAdmin 3” or “phpPgAdmin” for a MySQL database or respectively PostgreSQL database.

Using third-party applications like MySQL Workbench for managing your databases is not supported on our servers.

 

Can I use MySQL triggers? How can I create a MySQL database?

Regrettably, our Shared hosting platform does not support MySQL triggers. MySQL triggers can only be used on a VPS plan. We apologize for any inconvenience this may cause you.