Domain Registration Australia Icon AUSTRALIAN OWNED AND OPERATED SINCE 1996 Domain Registration Phone Number 1300 863 436

AFFORDABLE EMAIL &
WEB HOSTING PLANS

FREE

VIRUS PROTECTION &
SPAM FILTERING

HOSTING PLANS STARTING AT:

$144 /year
FREE SETUP

Domain Registration Australia

✓ no hidden costs
✓ no delegation fees
✓ no setup fees
✓ no administration fees
✓ online management
.AU registry accredited registrar
.AU ADMINISTRATION
Accredited Registrar

Information Centre

What host name/server name should I use to call out a MySQL database from a script?

To use a MySQL database on your web site with PHP, Perl or another scripting language, you will need to connect to it first. The host name/server name for connecting to a MySQL database on our servers is:

localhost

Before attempting to create a connection, be sure to check that you are using the correct database name, username and password.

Troubleshooting

If you're having trouble installing a software application due to what seems to be MySQL issues and assuming you have set up a MySQL database in your hosting account control panel, here's a simple test script you can try to determine at which end the problem is.

MySQL test script instructions

1. Copy and pasted the following into a file using Notepad or similar text editor.

<?php $link = mysql_connect('localhost','dbuser','dbpassword'); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>

2. Replace "dbuser" and "dbpassword" with the username and password you specified for the database you set up.

3. Save the file as "mysqltest.php"

4. Upload it via FTP or the file management feature in your hosting account control panel to your httpdocs folder

5. Load the file in your browser via http://www.companyname.com.au/mysqltest.php (replace companyname with your own domain name)

If a connection is made, the resulting page will display 'Connection OK', meaning everything at the server end is fine and therefore the problem likely lies in the  software you are attempting to install and you should contact the software vendor for assistance.

If a connection cannot be made, then you'll probably an error message like so:

Warning: mysql_connect( ): Access denied for user 'dbuser'@'localhost' (using password: YES)

Check your database details again and if you're sure have them correct, copy and paste that error and send it to our web hosting support team along with details of the database you created.

Available Domain Name Search & Register

www.

How to register a name: Enter your choice in the search tool and click 'GO'. If after the check the domain names search results show your choice is available, you will then have the option to proceed to purchase registration; which is a very quick and easy process - start a search and find your ideal website address now.