MySQL Databases
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
<< Back
|