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

Actualización de README. #2

Open
diegofpb opened this issue Nov 8, 2017 · 0 comments
Open

Actualización de README. #2

diegofpb opened this issue Nov 8, 2017 · 0 comments

Comments

@diegofpb
Copy link
Collaborator

diegofpb commented Nov 8, 2017

En el fichero config/db.php el host "localhost" deberia cambiarse por 127.0.0.1, ya que algunos sistemas no permiten este "localhost" y da fallo yii con la conexión a mysql. A su vez, se puede especificar el puerto por si la base de datos está dockerizada.

<?php

return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=127.0.0.1;port=3306;dbname=etsiinfbot',
    'username' => 'etsiinfbot',
    'password' => 'etsiinfbotpass',
    'charset' => 'utf8',
];

A su vez, seria interesante añadir, que si está dockerizada la base de datos, hay que cambiar las siguientes lineas, siendo "localhost" por "%", ya que la IP que recibe el docker es diferente. Quedaría así:

CREATE USER 'etsiinfbot'@'%' IDENTIFIED BY 'etsiinfbotpass';
GRANT ALL PRIVILEGES ON etsiinfbot . * TO 'etsiinfbot'@'%';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant