How to change MariaDB port and hostname while installing ERPnext?

I need to connect ERPnext to MariaDB using a custom port (not 3306).

While running bench new-site site1.local, I get an error message pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (timed out)") even if I modified the file sites/site1.local/site_config.json by adding:

"db_host": "127.0.0.1",
"dp_port": "3303"

and/or I edited sites/common_site_config.json by adding

 "db_host": "127.0.0.1",
 "db_port": "3303"

Is this the right place to modify the database connection port? If not when and where should I add it?

2 Likes