ahalya
ahalya

Reputation: 11

How to connent wordpress with a database base on server

I'm newbiee with wordpress , I installed wordpress with a new database where local host as hostname and username as abc123 , database as abc, password as abc according to it .

I tried with plugin like wp- business intelligence and cutomizr theme and i generated the tablke using query [wpbusinessintelligence id="1" type ="table"] Details [/wpbusinessintelligence].

Now my requirement is , I have xyz database and its not in local host its in 167.**.**.**, but when i try to follow the same steps with new folder for new report i get an error message like:

error with database connection

May i know where i'm going wrong and what steps should i follow .

Upvotes: 0

Views: 67

Answers (1)

Dan Tarlow
Dan Tarlow

Reputation: 343

You need to make changes to the wp-config.php file. This will be in folder that wordpress is installed in on the server.

There is also a wp-config-sample.php file, in the same folder, in case you make any mistakes and need to start again.

In the file there are settings for your database - so that the wordpress installation can communicate with the database ont eh server. these are the parameters you need to change.

Below is a copy of the file. You need to change the values in lower case in '' . For example, I believe that you should set

define('DB_NAME', 'xyz');

define('DB_USER', 'username_here');  // change  username_here
define('DB_PASSWORD', 'password_here');  // change password_here


    // ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'blue');

/** MySQL database username */
define('DB_USER', 'daniel');

/** MySQL database password */
define('DB_PASSWORD', 'daniel');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Then save the file and the database should make the connection and run wordpress.

Upvotes: 1

Related Questions