Cheap uk web hosting, domain name registration, dedicated servers and ssl certificates. Your first choice for fast uk web hosting and servers.

MySQL Support

Please find below our support section about MySQL. If you have a question that is not answered here, please contact us.

What is MySQL?

MySQL is a Linux based ODBC (Open DataBase Connectivity) compliant database system. This means that the database has coding that, when accessed using the correct drivers, can allow a user to link to the MySQL database from a compatible database on their own machine.

How do I set up MySQL on my hosting account?

You can setup a new MySQL database within your Hosting Control Panel.

We will require a username and password that you wish to use (this should be different from your web hosting username and password) - the database name is based on the username you choose. So if you choose 'customer' as the username then the database name would be 'customerdb'.

Once you have requested your database we will activate this on our systems and send you an e-mail confirmation within 24 hours.

How do I connect to my database?

The database itself does not exist as a file that you can upload or download using FTP. You can connect to the database in three ways Telnet, ODBC compliant software and via PHP version 3 or later.

Connecting to MySQL via SSH Telnet

You can connect to the server using SSH Telnet, once logged into the system you can access MySQL directly using the following command.

mysql -u username -p databasename

You will then be prompted for the password for the database. This will then place you at the MySQL prompt. For information of the commands that you can use, please refer to the online documentation at the MySQL web site.

Connecting to MySQL via PHP

For direct integration of the database into your web pages for dynamic updates - we provide the HTML-embedded scripting language PHP.

The basic command that you need to use in your PHP script is as follows:

$mysql_link = mysql_connect("DOMAIN NAME","USERNAME","PASSWORD");

This is the command needed to connect to the database. For details on the commands needed to handle the database please visit the PHP Web Site.

For further details on using PHP on your web hosting account please visit our PHP page.

Connecting to MySQL using MyODBC and an ODBC database

You can tie a database written in a PC based database package that is ODBC compliant - Microsoft Access, FoxBase and Dbase Pro are all ODBC compliant. To integrate this connection you will require drivers that convert the communication - you can download these drivers for Windows 95/98/ME and Windows NT/2000 from http://www.mysql.com/downloads/api-myodbc.html

The settings that you will require are as follows:

  • Hostname - Your domain name
  • MySQL Database Name - the name of the database
  • Username - database username
  • Password - database password Port - 3306

Can I create a separate username and give it specific access permissions?

Yes, you can create as many users as you want within the hosting control panel, and then assign these users to the your databases and also assign them specific privileges.

How do I backup my MySQL database?

If you have telnet (SSH) access then you can back up your MySQL database quite simply from the command line as using the following command:

mysqldump -u username -p password databasenamedb > backup.sql

Remember to replace 'username', 'password' and 'databasenamedb' with your settings. This will create a file called backup.sql which contains information from your database. You can now use FTP to transfer the file to your local computer.

If you do not have SSH access, then email our support team with the username, password, database name, and your domain name, and they will be able to run this command for you.

How do I load a dump or file into my database?

Upload the file to your hosting account using FTP then connect to your account using SSH. Once logged in, navigate to the location you uploaded the file and type the following commain at the prompt.

mysql -u[username] -p[password] [databasename] < [filename]

If you do not have telnet access, contact the support team ask we will load the file for you.

What is the MySQL server name?

If connecting via a script on the server, use 'localhost'. If you are connecting from your own PC, use your domain name or the IP address for your server. This was contained in your welcome email.

Can I connect using CGI to my database?

Yes you can. We support CGI and PERL DB modules to allow you to connect.

Where can I find out how to use MySQL?

Please visit www.mysql.com for full details on the syntax and usage.

« Back