[Warning] mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

GET /galerija/slano-posluzenje-masno/

Line 77 in /home/dunja/public_html/framework/model/connect/MySQLiConnector.php

Source

68 				$selectedDB,
69 				$parameters['port']
70 			);
71 		} else {
72 			$this->dbConn = new MySQLi(
73 				$parameters['server'],
74 				$parameters['username'],
75 				$parameters['password'],
76 				$selectedDB
77 			);
78 		}
79 
80 		if ($this->dbConn->connect_error) {
81 			$this->databaseError("Couldn't connect to MySQL database | " . $this->dbConn->connect_error);
82 		}
83 

Trace

GET /galerija/slano-posluzenje-masno/

[User Error] Uncaught SS_DatabaseException: Couldn't connect to MySQL database | Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

GET /galerija/slano-posluzenje-masno/

Line 55 in /home/dunja/public_html/framework/model/connect/DBConnector.php

Source

46 		if (!empty($sql)) {
47 			$formatter = new SQLFormatter();
48 			$formattedSQL = $formatter->formatPlain($sql);
49 			$msg = "Couldn't run query:\n\n{$formattedSQL}\n\n{$msg}";
50 		}
51 
52 		if($errorLevel === E_USER_ERROR) {
53 			// Treating errors as exceptions better allows for responding to errors
54 			// in code, such as credential checking during installation
55 			throw new SS_DatabaseException($msg, 0, null, $sql, $parameters);
56 		} else {
57 			user_error($msg, $errorLevel);
58 		}
59 	}
60 
61 	/**

Trace