• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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