Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow socket connection to MySQL #2143

Closed
Neraste opened this issue Jun 12, 2016 · 1 comment · Fixed by #2395
Closed

Allow socket connection to MySQL #2143

Neraste opened this issue Jun 12, 2016 · 1 comment · Fixed by #2395
Milestone

Comments

@Neraste
Copy link

Neraste commented Jun 12, 2016

Issue details

When I try to install the app with the pdo_mysql driver communicating by Unix socket, I get the following error when doing php bin/console wallabag:install --env=prod:

Step 2 of 5. Setting up database.
PHP Warning:  PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /srv/www/bag/release-2.0.5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 43
Creating database and schema, clearing the cache
PHP Warning:  PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /srv/www/bag/release-2.0.5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 43
The command "doctrine:database:create" terminated with an error code: 1.


  [Exception]                                                               
  The command "doctrine:database:create" terminated with an error code: 1. 

Environment

  • wallabag version (or git revision) that exhibits the issue: 2.0.5
  • How did you install wallabag? Via git clone or by downloading the package? tried both
  • Last wallabag version that did not exhibit the issue (if applicable): first install
  • php version: 5.6.1
  • OS: OpenSUSE 13.2 on ARMv7l
  • type of hosting (shared or dedicated): dedicated
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): MariaDB

Steps to reproduce/test case

Just tried to install it following the install guide, except that there are no directives for a Mysql install.

Used the following app/config/parameters.yml file:

# This file is auto-generated during the composer install
parameters:
    database_driver: pdo_mysql
    database_host: socket:/var/run/mysql/mysql.sock # also tried socket:///var/run/mysql/mysql.sock
    database_port: null
    database_name: symfony
    database_user: symfony_user
    database_password: __password__
    database_path: '%kernel.root_dir%/../data/db/wallabag.sqlite'
    database_table_prefix: wallabag_
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    locale: fr
    secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
    twofactor_auth: true
    twofactor_sender: __address__
    fosuser_confirmation: true
    from_email: __address__
@j0k3r
Copy link
Member

j0k3r commented Jun 13, 2016

Thanks for reporting this to us, we did not provide configuration for connection using sock right now.
The fix is easy to produce.*

We need to add the option unix_socket in the config.yml file (see).

@j0k3r j0k3r added the Easy bug label Jun 13, 2016
@j0k3r j0k3r changed the title Cannot install Wallabag 2.0.5 with Mysql Allow socket connection to MySQL Oct 7, 2016
@j0k3r j0k3r added this to the 2.1.2 milestone Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants