Closed erdenkind closed 4 years ago
That often indicates that your .env DATABASE_URL is misconfigured.
If you are 110% sure it correct, you can try to edit the file config/packages/doctrine.yaml and change # server_version: '5.7'
to server_version: '5.7'
, then run bin/console cache:clear
and run the installer again.
But first check twice that your DATABASE_URL is correct.
.env (uncommented lines deleted) MAILER_FROM=kimai@example.com APP_ENV=prod APP_SECRET=change_this_to_something_unique DATABASE_URL=mysql://kimaifour:passwd@127.0.0.1:3306/kimaifour MAILER_URL=null://localhost CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
Doctrine.yaml:
doctrine: dbal: default_connection: default connections: default: url: '%env(resolve:DATABASE_URL)%' driver: 'pdo_mysql' server_version: '5.7' charset: utf8mb4 default_table_options: charset: utf8mb4 collate: utf8mb4_unicode_ci
...
Error still exists:
In ConnectionFactory.php line 79:
An exception occured while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value
For further information have a look at: https://github.com/doctrine/DoctrineBundle/issues/673
In AbstractMySQLDriver.php line 93:
An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'kimaifour'@'localhost' (using password: YES)
In PDOConnection.php line 31:
SQLSTATE[HY000] [1045] Access denied for user 'kimaifour'@'localhost' (using password: YES)
In PDOConnection.php line 27:
SQLSTATE[HY000] [1045] Access denied for user 'kimaifour'@'localhost' (using password: YES)
This is your real problem:
Access denied for user 'kimaifour'@'localhost' (using password: YES)
As I said:
That often indicates that your .env DATABASE_URL is misconfigured.
The error An exception occured while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value
is misleading, because it is just a follow up error.
You have to fix your database connection. If Kimai can't reach the database, the server version cannot be found as well. You can revert the changes in the doctrine.yaml.
Hello,
sorry for a Little offtopic questioning:
mysql starts..normally. Connect kimaifour works fine
Do you have a little howto, how to configure the mysql database after a brand new installation?
That's what I did for the kimaifour User (full acces for the first test) CREATE USER 'kimaifour'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON . TO 'kimaifor'@'localhost';
phpMyAdmin works absolutely fine on the LAMP Installation...
That has actually nothing to do with Kimai and is documented thousands of times in the Internet ;-) But here you go: https://www.kimai.org/documentation/fresh-ubuntu-18.html#create-database
Is that just a typo here or also in your installation?
GRANT ALL PRIVILEGES ON . TO 'kimaifor'@'localhost';
kimaifor
vs kimaifour
Hello back,
Is that just a typo here or also in your installation? sorry, only a typo problem.
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS kimaifour
;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> CREATE USER IF NOT EXISTS kimaifour
@127.0.0.1 IDENTIFIED BY "passwd";
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> GRANT select,insert,update,delete,create,alter,drop,index,references ON kimaifour
.* TO kimaifour@127.0.0.1;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> exit;
Bye
Still the connection problem, but only with the kimai installation. PHP Check files are able to connect to the mariaDB.
There are users for 127...and localhost in the mariaDB:
127.0.0.1 | kimaifour | HASH | localhost | kimaifour | THE SAME HASH |
Show me the check files please. Is "passwd" really your password? Or is it some string containing special character? But still: Kimai (Doctrine) uses normal pdo connections.
passwd means: my original password overwritten Sorry for bothering: what do you mean with "check files"..? I am a novice about the installation..
I can connect to MariaDB by sudo mysql: MariaDB [(none)]> I can show the users and the database kimaifour: 127.0.0.1 | kimaifour | HASH | and localhost | kimaifour | THE SAME HASH | I do have the privileges set as described.
But still the kimai install error.
Whatever you mean with:
PHP Check files are able to connect to the mariaDB.
Show me the real connection string. This complete discussion is about solving your local problem. Kimai works fine, you have a problem in YOUR installation. If you want any more help, you have to show me the exact commands and configs you are using.
DATABASE_URL=mysql://kimaifour:applet4E$n@127.0.0.1:3306/kimaifour
Can you please try (in this order) two things, I believe the $
is the problem.
DATABASE_URL='mysql://kimaifour:applet4E$n@127.0.0.1:3306/kimaifour'
And if that still fails, the last idea I have is to replace this line from url: '%env(resolve:DATABASE_URL)%'
to url: '%env(DATABASE_URL)%'
YESYESYES!
The dollar sign was the problem! THANKS!!!
But what does that mean: [ERROR] Failed to clear cache: You have requested a non-existent parameter "kimai.theme".
Do you have a local.yaml?
..I do have all the files that where downloaded by the git dup.
What does git status
report?
Try rm -rf var/cache/*
and then a bin/console cache:warmup --env=prod
Super!
[OK] Cache for the "prod" environment (debug=false) was successfully warmed.
Maybe some hickup due to the previous problems.
Sorry for another "user"question: after the installation: what is the url that I can reach kimai now? Or do I have to add it into the apache2 first? (if YES: how to add the kimai2: its files are located under /var/www/kimai2/ ..default website apache2 /var/www/html/
Did you consider to read the documentation first? I know asking is easier ...- but its all in there: https://www.kimai.org/documentation/installation.html#webserver https://www.kimai.org/documentation/fresh-ubuntu-18.html https://www.kimai.org/documentation/webserver-configuration.html
You can feel free to check my temporary wiki at https://wiki.casperbb.com/view/Wyvt-rsksolutions I'm trying to meld a couple of things onto a fresh virtual machine to suit my business needs, but the kimai2 parts work perfectly using Kevin's documentation (even LDAP). I just had to pull pieces from his various links to make it flow a little better.
Awesome @acmeraptor thanks for sharing 👍 if you have any hint how to improve the official documentation, please let me know! It's not that easy to write a good documentation, if you don't need it yourself ;-)
@kevinpapst Your documentation has been some of the best I have ever seen. Each setup is different depending on various needs, including mine. I would be happy to help other users with things like this though so that you can keep working on kimai2 for all of us. :)
Seems to be solved
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.
Describe the bug The Installation of Kimai2 bin/console kimai:install breaks
An exception occured while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value For further information have a look at: https://github.com/doctrine/DoctrineBundle/issues/673
To Reproduce Steps to reproduce the behavior:
Logfile