Skip to main content

[FAQ] Information: Database Questions

Answers to common programming and database questions. Includes MySQL,  MS-SQL Q & A's.


Do you support Microsoft Access databases?
Do you support MS SQL databases?
Do you support MySQL?
How do I move a MySQL database from my old host, to your servers?
How do I set up a Microsoft Access database on the server?
How do I connect to a MySQL database?
What is a connection string to a MySQL database from the server?

 

Do you support Microsoft Access databases?

Yes, as of writing Microsoft Access databases are supported on most Windows hosting plans. Please check with us on current status.

RETURN TO TOP OF PAGE

 

Do you support MS SQL databases?

Our Corporate and Business Class webhosting plans on the windows server cluster, do now support MS SQL Server 2000 databases. One free 20MB MS SQL database is included with our Business Class hosting plan, while MS SQL databases for our Corporate Plan must be purchased separately. Please contact us for pricing. Pricing for MS SQL databases vary on the number of accounts you have with us, and your diskspace requirements. Most databases will be well under 20MB in size.
After the first 20MB block of diskspace you can upgrade to 50MB of diskspace. From then additional blocks can be purchased in multiples of 50MB. eg, 50MB, 100MB, 150MB, 200MB and so on. Please email us for more info and pricing.
Additional MS SQL diskspace must be purchased and allocated prior to you needing it, and is billed 12 months in advance.

RETURN TO TOP OF PAGE

 

Do you support MySQL?

Yes, we support MySQL databases. You can manage your databases from within your web based control panel

RETURN TO TOP OF PAGE

 

How do I move a MySQL database from my old host, to your servers?

Moving databases from one provider to another should be a relatively simple process. Below is a brief description of how to do this. Your designer or developer should be able to process this for you.

Exporting from phpMyAdmin with your old provider:
Open your phpMyAdmin console with your current hosting provider.
On the welcome screen you will see an Export option click on this link. (Make sure to select the version of MySQL on our servers, incase there are any differences in the versions)
This will bring up the view dump (schema) of databases screen
Select the tables you wish to be exported from the list
Ensure you choose SQL as the option (this will allow you to just paste the SQL in your phpmyadmin console on our servers)
This will now create text file on the screen, highlight the information and paste it into a text document. Save this until you are ready to import it into the phpMyAdmin console on our server.

Import into phpMyAdmin on our servers:
Open your phpMyAdmin, which you can access from within your hosting control panel. This will be under the 'MySQL Databases' section of the control panel.
On the welcome screen you will see an Query window option (lower left corner) click on this link
Paste the contents of the text file that you exported and done. Your database and it's contents are moved.

RETURN TO TOP OF PAGE

 

How do I set up a Microsoft Access database on the server?

To set up a Microsoft Access database on the server you will need to upload it to your web directory, then send us a support request from your Control Panel so we can enable write access to the database file.

RETURN TO TOP OF PAGE

 

How do I connect to a MySQL database?

Corporate and Business Plan Users:

MySQL Host Address:

Local: 127.0.0.1

Remote: Please log into your Control Panel at www.controlpanel.co.nz , and go to the databases section where your database is setup. This will tell you the remote database connection address to use.


cPanel Users:

MySQL Host Address: localhost


Example Connection Strings:
Perl: $dbh = DBI->connect("DBI:mysql:YOUR DATABASE HERE:localhost","YOUR DATABASE USERNAME HERE","PASSWORD HERE");
PHP: $dbh=mysql_connect ("localhost", "YOUR DATABASE USERNAME HERE", "PASSWORD HERE") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("YOUR DATABASE HERE");

Please note that we don't provide support for this connection string and is used at the clients own risk.

RETURN TO TOP OF PAGE

 

What is a connection string to a MySQL database from the Windows server?

Below is a sample code.

********************************************************************
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=db.mydns.net.nz;" +
"DATABASE=blah_db;" +
"UID=blah_user;" +
"PASSWORD=blah_passwd; Trusted_connection=yes;" +
"OPTION=3";

OdbcConnection conn = new OdbcConnection(MyConString);
string myInsertQuery = "SELECT value FROM Counters WHERE id=1";
********************************************************************

Please note that we don't provide support for this connection string and is used at the clients own risk.

More connection strings can be found at http://www.connectionstrings.com/

RETURN TO TOP OF PAGE