WHMCS-bridge

How to connect to mySQL database ? Print

  • 0

One of the advanced features of cPanel is that it allows you to manage your databases.The Databases section will allow you to create MySQL and PostgreSQL databases and users. Through this, you can get access to them and modify the databases you wish to change.

 

SQL (Structured Query Language) is an international standard in retrieving and querying information from databases, while PostgreSQL is an object-relational database management system.

 

MySQL is essentially an SQL server as it works by responding to requests for information that are written in SQL. You can choose from a great selection of programming languages if you want to communicate with MySQL. PHP is one of the most common languages being used. This is an open software and you can use it for free.

 

Connecting to your MysSQL database is easy. The MySQL database will need a script calling or querying the database for the information it stores. In order to do this, you must connect your script to the database with a configuration file. If you are not sure where your configuration file is, you can check the various scripts and their location.

 

Database driven scripts, such as WordPress, WHMCS and Joomla, will generally have a default configuration file ready for you to edit with the appropriate information. Here are examples of what this access information will look like.

 

  • Host Name. You need to input localhost.
  • Database Name. This includes you cpanelUsername_databaseName.
  • Database Username. This includes your cpanelUsername_databaseUsername.
  • Database Password. This is the password that you have set.

 

Remember that when you move databases to our servers, the database name and username may change. This change must be updated in your script code. You can find the database name and username in cPanel, in the MySQL area. While on shared servers, the database username cannot be changed to something without the cPanel username in it. This is to keep database names and usernames from conflicting with others on the server.

 

You can also access MySQL remotely and allowing remote MySQL connections is often done to enable a program on your personal computer to access a database on the server. You simply have to learn another set of configuration settings.


Was this answer helpful?

« Back

WordPress and WHMCS integration by i-Plugins