|
Answer
by: George Kaloyanov, Aplus.Net Knowledge Base Support
MySQL
can be accessed through PHP scripts. You are going to need to know
the following information.
The information you need to know is:
- Hostname: You can use localhost or
the name of the server that hosts your web space.
- MySQL Database Username:
The username of your specific MySQL Database based on your Main
FTP Username.
- MySQL Database Password:
The password you set when adding your database to your plan.
Your
connect script will look something like
mysql_connect(“hostname”, “mysql_username”, ”mysql_password”)
Note:
If you do not know the hostname of your shared hosting server,
please contact our Customer Support team by phone at 1 888
301 2516 (toll free) or 1 858 410 6900 for international callers.
You may contact Customer Support by email at
,
please include your registration number so we can locate your
account.
You
can test your MySQL connection through PHP script by creating a simple
php script using the following code:
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
Related
links:
|