Fix Database Connection Post-Deployment

Job ID: 40556513

Budget: $30 – $250 USD

Deployment (Hostinger + GitHub)
Project Overview

I'm looking for an experienced Node.js/Express developer who is familiar with Hostinger VPS/Web Hosting, GitHub deployments, MySQL, and CORS.

The frontend is already online, but the backend API cannot connect to the MySQL database after deployment.

The project was working during development but is failing after deployment to Hostinger.

Current Setup
Frontend
Next.js
Hosted at:
https://pgaming.net
Backend
Node.js
Express
Hosted at:
https://api.pgaming.net
Connected to GitHub
Auto-deploy enabled
Database
Hostinger MySQL
Imported successfully into phpMyAdmin
Tables exist including:
announcements
banner_slides
page_contents
roster_members
roster_sections
Current Error

Every API request that touches MySQL returns:

ER_ACCESS_DENIED_ERROR
Access denied for user
(using password: YES)

Example:

https://api.pgaming.net/announcements

returns

{
"code":"ER_ACCESS_DENIED_ERROR",
"errno":1045,
"sqlState":"28000",
"sqlMessage":"Access denied for user ..."
}

Hostinger runtime logs show the same MySQL authentication error.

What Has Already Been Tried
Created a brand-new MySQL database
Created a brand-new MySQL user
Imported the SQL database successfully
Changed the MySQL password multiple times
Updated all Hostinger Environment Variables
Redeployed the application several times
Verified DB_USER
Verified DB_PASSWORD
Verified DB_NAME
Tried localhost
Tried 127.0.0.1
Updated GitHub repository
Updated backend code
Confirmed Express server starts correctly on port 5000

The Node application runs, but cannot authenticate with MySQL.

What Needs To Be Fixed
Fix the MySQL connection.
Verify Hostinger environment variables.
Verify mysql2 connection configuration.
Verify Hostinger Node deployment.
Fix any CORS issues if necessary.
Ensure announcements, banners, login, register, roster, etc. all work correctly.
Make sure the API is production-ready.
Tech Stack
Node.js
Express
MySQL2
JWT Authentication
Cookie Parser
Next.js
GitHub
Hostinger
phpMyAdmin
Access Provided

I will provide:

GitHub Repository
Hostinger Access
Environment Variables
Database Access
Domain Access
Requirements

Please only apply if you have experience with:

Node.js
Express
MySQL
Hostinger
GitHub deployments
Production debugging

This should be a quick job for someone experienced with Hostinger deployments.