Home  |  About Us  |   Call us    Call Us Now  08879621622


Domains  |  Website Hosting  |  Website Design  |  Resellers  |  Email Solutions  |  Web Tools  |  Support

Portal Home > Knowledgebase > Cpanel / Linux / WHM / Reseller > How to connect to mySQL database?

How to connect to mySQL database?

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?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
cPanel Security Tools (Views: 416)

Powered by WHMCompleteSolution

NEED HELP?    Call us for all your web related queries on 08879621622


About AchaHost

About Us

Contact Us

CEO Murli Sripathi

Need Help


Terms of Service



Payment Methods


My Account

My Account

Create Account


Find a Domain Name

Web Hosting

Web Design


Email Solutions

Web Tools

Connect with us

Facebook  Twitter  Linked In  Google Plus

Help us to understand your needs better

Follow us and get exciting offers


Payment Methods :

Credit Card | Debit Card | Net Banking


paypal    Net Banking



Usage of this Site is subject to express terms of use.
By using this site, you signify that you agree to be bound by these
Terms of Service | Privacy Policy

Copyright © AchaHost.com. All Rights Reserved.