• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue Can't migrate Laravel website - QueryException: SQLSTATE[HY000] [2002] Connection refused

gene123

New Pleskian
Hi there, I can't migrate existing Laravel website from old Plesk to new Plesk Obsidian, OS: CentOS Linux 7.9.2009 (Core). When I go to login page and click "Login" I'm getting QueryException: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `email` = ....). The new database with username/password was created. I specified it in .env file as well as in config/database.php.
Also when I ssh into this server and run command: >php artisan config:cache
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/vhosts/<my domain>/artisan on line 33
>php -v gives: PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
although in plesk domain PHP version: 7.3.27
What could be the issue here? Thanks.
 
Last edited:
Besides username and password there are host name and port. Is the host set to localhost or 127.0.0.1 and the port set to 3306 (normally)?
 
When running PHP in command line the default PHP version from the OS will be used. Which in case of CentOS 7.9 will be 5.4. Instead you can run /opt/plesk/php/7.3/bin/php -f artisan config:cache to utilize the PHP 7.3 version offered by Plesk.

Not sure if that solves your issue, but it might helps you to find a solution to your database issue.
 
Back
Top