Ad Widget

Collapse

Cannot Connect to Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NathanS2
    Junior Member
    • Jul 2022
    • 3

    #1

    Cannot Connect to Database

    I'm getting the following error on setup:

    Click image for larger version

Name:	image.png
Views:	283
Size:	59.8 KB
ID:	448924

    However, on the machine on which PHP is running, I can run the following:
    Click image for larger version

Name:	image.png
Views:	188
Size:	46.4 KB
ID:	448925

    And that works fine, so it's for sure not the DB server, which is running with Zabbix Server just fine, by all appearances.

    I've also tried manually setting the port (3306). Permissions were granted to the user at '%', so it shouldn't be a permissions thing there.

    Any ideas?

    Thanks!

  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    To fix, you can increase the maximal packet size limit max_allowed_packet in my.cnf file, eg. set max_allowed_packet = 128M, then restart your MySQL server

    Comment

    Working...