Closed bUrinot closed 3 years ago
Is the database in your regular Laravel installation working? And is it also working without the DB_SOCKET
setting? This part is ignored by the pagebuilder package at the moment as it makes its own connection.
Hey. thanks for responding. ok, it was that! I have added the unix_socket at the PDO and it's working now...
$this->pdo = new PDO(
$this->pdo = new PDO(
$config['driver'] . ':host=' . $config['host'] . ';unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock;dbname=' . $config['database'] . ";options='--client_encoding=" . $config['charset'] . "'",
$config['username'],
$config['password'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
` Now I'll be able to check this repo as it seems amazing thanks
Hello there! Thanks for the plugin I'm trying to install a Laravel Pagebuilder in a new Laravel project (8.27) and all the time i get a PDOException Error PDOException SQLSTATE[HY000] [2002] Connection refused vendor/hansschouten/phpagebuilder/src/Core/DB.php:32 ` $this->pdo = new PDO(
`
This in pagebuilder.php ` 'storage' => [
`
and this in .env `
DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=sitebuilder DB_USERNAME=root DB_PASSWORD=root DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock `
I'm sure is a newbie thing but if you can give a hint on how to fix it