Frequently Asked MySQL Questions

Do you support MySQL?

MySQL is supported on all services however on free hosting, some features and restrictions are in effect (eg. LOCK TABLES)

How do I create a MySQL Database?

Please refer to the specific section in the knowledgebase for your particular service for exact information.

How do I connect to my MySQL Database in a script?

You will need a few pieces of information based on your database and account...

  1. Database Host/Server name
  2. Database Name
  3. Database Username
  4. Database User Password
  5. Database Table Prefix (for some scripts)

For detailed information on obtaining these pieces of information, please refer to the specific section in the knowledgebase for your service.

How do I access phpMyAdmin?

In cPanel this is an icon, in vistaPanel this will be available through your MySQL Databases area and in VPS, this is installed by you at your discretion and is dependent upon your configuration.

I can't login to my free hosting phpMyAdmin, it keeps redirecting, what do I do?

  1. Change your password via Change Password to the same one
  2. Clear your browser cookies, cache and temporary files
  3. Clear Authenticated Sessions (may not be available in all browsers)
  4. Logout of your control panel if not already done
  5. Restart your browser and login again

If you have further issues, try using an alternative browser and check that you have cookies fully enabled and accepted as well as any security software which may interfere with the activity.

How do I import a large MySQL database backup?

The best way to do this would be to use a tool such as a staggered MySQL import script however we are not able to import large backups on free hosting via support or provide technical support for such imports.

On Premium services you may contact support for assistance with large database imports, use a MySQL dump tool, or use cPanel options to import large backups.

For VPS users you may do this easily by uploading your backup .SQL files to your VPS and running the following:

mysql -u USER -p PASSWORD DBNAME < dump.sql

Replace user and password with the username and password for the database (or use your root username) and replace DBNAME with the name of the database you are importing into and the dump.sql file with the name of your dump file.

How do I backup my databases?

Using phpMyAdmin you can export database backups via the Export tab while accessing the database you wish to backup on all services with the exception of VPS which requires installation of phpMyAdmin prior to use.

For cPanel users you may also use the backup options in cPanel such as the Backup Wizard or you may use database backup scripts

For VPS users you can backup your databases via mysqldump, for more information please issue the command man mysqldump

How do I retrieve a lost MySQL user password?

On free hosting your MySQL password is the same as your website control panel, if you are able to login via your control panel you can use the same for your database.

For cPanel users you will have to delete the MySQL user using MySQL Databases and re-create it using a new password or, if you're savvy, you can peek into your script configuration files to recover the password for that MySQL user account.

For VPS users you have a couple of methods, first is for just a normal MySQL user (eg. john):

  1. Login to your VPS via SSH
  2. Run: mysql -u root -p
  3. At the mysql> prompt type: use mysql;
  4. Change the password for user john: update user set password=PASSWORD("NEWPASSWORD") where User='john';

Change step 2 if you've set a password for your root account to: mysql -u root -p'password'

If you have changed your root MySQL password and forgotten it you can do the following:

  1. Login to your VPS via SSH
  2. Run: /etc/init.d/mysql stop
  3. Run: mysqld_safe --skip-grant-tables &
  4. Run: mysql -u root
  5. Run at the mysql> prompt: use mysql;
  6. Run at the mysql> prompt: update user set password=PASSWORD("NEWPASSWORD") where User='root';
  7. Run at the mysql> prompt: flush privileges;
  8. Run at the mysql> prompt: quit
  9. Run: /etc/init.d/mysql stop
  10. Run: /etc/init.d/mysql start

Can I have more databases?

You are only able to have as many databases as comes with your service plan, if you require more, please consider upgrading to a more powerful and feature-filled account.