Your login is failing because the database password in config/config.php is set to 'YOUR_PASSWORD_HERE' (a placeholder). The PHP backend cannot connect to your MySQL database.
-
Access your Hostinger File Manager:
- Log in to Hostinger Control Panel
- Go to "Files" → "File Manager"
- Navigate to your website's root directory
-
Edit the config file:
- Find and open:
config/config.php - Look for line 5:
define('DB_PASS', 'YOUR_PASSWORD_HERE');
- Find and open:
-
Get your database password:
- In Hostinger panel, go to "Databases" → "MySQL Databases"
- Find database:
u677493242_plugins - Copy your database password (or reset it if you forgot)
-
Update the config file:
define('DB_PASS', 'your_actual_password'); // Replace with real password
-
Save the file
If you have SSH access:
# Connect to your server
ssh your_username@aqua-sparrow-114102.hostingersite.com
# Navigate to your website directory
cd public_html # or wherever your site is located
# Edit config file
nano config/config.php
# Update DB_PASS line, then save (Ctrl+X, Y, Enter)After updating the password:
-
Test database connection:
- Visit:
https://aqua-sparrow-114102.hostingersite.com/api/test-db.php - You should see: "✓ Database connected successfully!"
- Visit:
-
Create admin user (if needed):
- SSH into server and run:
php sql/seed.php - Or use File Manager to run the script via browser
- SSH into server and run:
-
Try logging in again:
- URL:
https://aqua-sparrow-114102.hostingersite.com/frontend/public/login.html - Email:
admin@mixlarlabs.com - Password:
admin123
- URL:
Also update these in config/config.php:
// Email settings (for password reset to work)
define('SMTP_USER', 'noreply@yourdomain.com'); // Your actual email
define('SMTP_PASS', 'your-email-password');
// Site URL
define('SITE_URL', 'https://aqua-sparrow-114102.hostingersite.com');If login still fails after updating the password:
- In Hostinger panel → "Advanced" → "Error Logs"
- Look for recent PHP errors
- The improved login.php now provides detailed logs:
- Database connection status
- User lookup results
- Password verification results
| Error | Cause | Solution |
|---|---|---|
| "Server error. Please check if database is configured correctly." | Wrong DB password | Update config.php with correct password |
| "Invalid credentials" | User doesn't exist or wrong password | Run sql/seed.php to create admin user |
| "Email and password are required" | Frontend not sending data | Check browser console for JavaScript errors |
After successful login:
- Immediately change the admin password from 'admin123'
- Never commit
config/config.phpwith real passwords to git - Keep database credentials secure
Run the diagnostic script:
php api/test-db.phpThis will tell you exactly what's wrong:
- Database connection status
- Admin user status
- Password hash verification
Quick Summary:
- Edit
config/config.phpon your Hostinger server - Replace
'YOUR_PASSWORD_HERE'with your actual MySQL password - Save file
- Run
sql/seed.phpto create admin user - Try login again