Bluehost Web Hosting Help
Connecting Scripts to MySQL Databases
In order for your MySQL database to work as intended, it 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 the use of a configuration file. If you are not sure where your configuration file is, check this list of different scripts to find its location: Location of Script Configuration Files
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. Below you will find examples of what this access information will look like:
Host name = localhost (literally put localhost)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (whatever you picked)
Username = joe1337 , Database name = joe1337_wrdp1 , Database-user name = joe1337_wp1 , Database-user password = eHTb7%Pxa9
// ** MySQL Settings ** //
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
Note: When you move databases to our servers, the database name and username may change. This change must be updated in your script code. (The database name and username can be found in the "MySQL Databases" tool under the "Databases" category of your cPanel.)
On shared servers, the database user name cannot be changed to something without the cPanel user name in it. This is to keep database names and usernames from conflicting with other people on the server.
Recommended Help Content
Connecting to your MySQL DB from Dreamweaver
How can I connect to our MySQL database from Dreamweaver?
How to Create and Delete MySQL Databases and Users
This article will explain MySQL database and user creation and deletion, and explain how to assign a user to a database.
How To Reset MySQL Database User & Password
This article will explain how to change the password for a database in the event that the original password is lost.
Related Help Content
MySQL Database and user name convention
I cannot connect to my database locally or remotely, do I have the correct server, username and password?
Setting a Password for the Main MySQL User
I am prompted to set a new MySQL password. What does this mean and how do I change it?
Managing Databases with Applications
This article will go over different application available for remote connection to your databases.
How To Setup Remote Database Connection - Configure MySQL client Access
How do I remotely connect using a database management software?
How To Manage Databases With Command Line SSH
This article will instruct you how to export a database from the command line (SSH).
How Import Databases Using Command Line SSH
This article will instruct you how to import a database from the command line (SSH).
MySQL Database Compatibility
How do I make my MySQL database compatible with the version you provide?
Restore MySQL databases using the Site Backup & Restore tool
How to restore MySQL databases using the Site Backup & Restore tool