Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TopDev's avatar
Level 1

In some case, Laravel app can't connect to local Database.

I created a Laravel game server and hosted on Hostinger. A mobile game is working well in general, but the server is responding 500 error 4 or 5 times a day. The error is from the database connection issue.

This is the error message.

[2024-06-04 22:34:47] local.ERROR: SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MariaDB server (Connection: mysql, SQL: select * from `personal_access_tokens` where `personal_access_tokens`.`id` = 46 limit 1) {"exception":"[object] (Illuminate\Database\QueryException(code: 1130): SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MariaDB server (Connection: mysql, SQL: select * from `personal_access_tokens` where `personal_access_tokens`.`id` = 46 limit 1) at /home/u657679279/domains/dinolife.org/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:793)

Since this error happens occasionally, I can't fix this error.

Any idea?

0 likes
1 reply
jlrdw's avatar

Are you getting too many simultaneous connections.

Please or to participate in this conversation.