error establishing a database connection code example
Example 1: wp-config.php repair
define('wp_allow_repair' true)
Example 2: error establishing a database connection
database name : your databse_name
username: root or your database username
password: ''
database host: 127.0.0.1:3306 or your MySQL port /*add Mysql port */
table prfix: wp_
/*use this 127.0.0.1 port instead of localhost and
add mysql port 3306 after 127.0.0.1 */