Check out example codes for "error establishing a database connection". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

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

Code Example 3

define('wp_allow_repair' true)

Learn ReactJs, React Native from akashmittal.com