It is not necessary to include a module as PHP contains native MySQL connection support. However, a MySQL database can be accessed on Dedicated server Hosting using all of the programming languages available on the server.
Follow the steps given below to access MySQL database on a Linux Dedicated server :-
1) First, login to the Linux web server using Secure Shell.
2) Type the following connection string to connect to your database:
<?php
$link = mysql_connect(‘host‘, ‘username‘, ‘password‘) or die(‘Could not connect: ‘ . mysql_error());
mysql_select_db(‘database‘) or die(‘Could not select database’);
?>
- host: enter the MySQL server that you are assigned to, for example, mysql4.dedicatedserverhostingonline.com
- username: enter the username provided for your database
- password: enter the password provided for your database
- database: enter the name of the MySQL database























Tweet This
Leave a Reply