error establishing a database connection
snippet in sql

wp-config.php repair

user1694

define('wp_allow_repair' true)

error establishing a database connection

user4451

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  */

error establishing a database connection wordpress

user5070

Go to Folder Bitnami > wordpress-5.4.1-0 then launch managers-windows, click on 
Manage Servers tab, select MYSQL Database and click on start. when running 
go to your local wordpress website