# WordPress cannot connect to MySQL on SQL303 – Connection timed out

**URL:** <https://forum.infinityfree.com/t/wordpress-cannot-connect-to-mysql-on-sql303-connection-timed-out/120935>\
**Category:** Hosting Support\
**Created:** [September 27, 2026, 4:02am UTC](https://forum.infinityfree.com/t/wordpress-cannot-connect-to-mysql-on-sql303-connection-timed-out/120935 "2026-09-27T04:02:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CamHeatGo](https://forum.infinityfree.com/letter_avatar/camheatgo/32/6_449c533f586939b6e5f246632a46421f.png) [@CamHeatGo](https://forum.infinityfree.com/u/CamHeatGo)\
**Post date:** [September 27, 2026, 4:02am UTC](https://forum.infinityfree.com/t/wordpress-cannot-connect-to-mysql-on-sql303-connection-timed-out/120935/1 "2026-09-27T04:02:10Z")

</div>

### Website URL

[https://heatgo.great-site.net](https://heatgo.great-site.net)

### Error Message

mysqli\_real\_connect(): (HY000/2002): Connection timed out

Error establishing a database connection.

The database has been successfully imported and phpMyAdmin can access the database, but WordPress/PHP cannot connect to the MySQL server.

MySQL host: [sql303.infinityfree.com](http://sql303.infinityfree.com)  
Database: if0\_43014825\_heatgo  
MySQL user: if0\_43014825

### Other Information

I migrated my WordPress website from LocalWP to InfinityFree.

The WordPress files have been uploaded to /htdocs and the database SQL file was successfully imported into the InfinityFree database. phpMyAdmin shows the WordPress tables.

I have also checked wp-config.php and confirmed the database name, username, password and hostname.

The PHP error specifically says: “Connection timed out”.

Please check whether there is an issue with PHP connections to the SQL303 MySQL server.

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [September 27, 2026, 9:19am UTC](https://forum.infinityfree.com/t/wordpress-cannot-connect-to-mysql-on-sql303-connection-timed-out/120935/2 "2026-09-27T09:19:13Z")

</div>

I checked your wp-config.php file and immediately spotted the issue. You’re using the value `sql303_infinityfree.com` as database hostname. That’s not right, it should be `sql303.infinityfree.com`.

I don’t see any other obvious issues, so please try updating that and see if it solves the issue.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [October 4, 2026, 9:19am UTC](https://forum.infinityfree.com/t/wordpress-cannot-connect-to-mysql-on-sql303-connection-timed-out/120935/3 "2026-10-04T09:19:50Z")

</div>

Closed on October 4, 2026, 9:19am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
