TimeTrex Time and Attendance
http://forums.timetrex.com/

Timetrex Debug is unable to connect to its database
http://forums.timetrex.com/viewtopic.php?f=1&t=7386
Page 1 of 1

Author:  brad [ Wed Mar 08, 2017 11:44 am ]
Post subject:  Timetrex Debug is unable to connect to its database

I have been to install severaltimes the software and solved some errors on my configuration file(timetrex.ini.php). I have finally managed to start the installation, and its broke it when the process "Initializing database" has 85% whit the next error message:

Timetrex Debug is unable to connect to its database, please make sure that the database service on your own local timetrex-Debug server has been started and is running if you are unsure, try rebooting your server.

I was using next configuration:
OS: Windows 10
Timetrex: Community_Edition_v10.1.2 (Manual Installation)
Php: 5.6
Database: Mysql 5.7
Web Server: IIS
Browser: Google Chrome Version 56.0.2924.87

In the php log errors file there are not errors.

i attach a file with more information.

Thanks a lot.

Attachments:
File comment: Images, timetrex.ini.php and timetrex.log
install_Log.docx [836.77 KiB]
Downloaded 20 times

Author:  shaunw [ Wed Mar 08, 2017 3:08 pm ]
Post subject:  Re: Timetrex Debug is unable to connect to its database

MySQL is giving you this error:
Quote:
mysqli error: [1093: You can't specify target table 'user_preference' for update in FROM clause


When trying to run this query:
Code:
delete from user_preference where id in ( select * from ( select a.id from ( select user_id from user_preference group by user_id having count(*) > 1 ) as tmp, user_preference as a WHERE a.user_id = tmp.user_id ) as tmp );


Something is strange though, since we use MySQL on our test system and here and it works just fine:
Code:
mysql> select version();
+-------------------------+
| version()               |
+-------------------------+
| 5.7.17                   |
+-------------------------+
1 row in set (0.02 sec)

mysql> delete from user_preference where id in ( select * from ( select a.id from ( select user_id from user_preference group by user_id having count(*) > 1 ) as tmp, user_preference as a WHERE a.user_id = tmp.user_id ) as tmp );
Query OK, 0 rows affected (0.01 sec)


What is the full and exact version of MySQL that you are using?



*NOTE: This URL may provide more information for developers: http://stackoverflow.com/questions/4549 ... rom-clause

Author:  brad [ Wed Mar 08, 2017 3:40 pm ]
Post subject:  Re: Timetrex Debug is unable to connect to its database

I am using MySQL version '5.7.9-log'

Author:  shaunw [ Wed Mar 08, 2017 4:02 pm ]
Post subject:  Re: Timetrex Debug is unable to connect to its database

I would recommend upgrading to the latest version to see if that makes any difference.

Unfortunately we run into this quite often with MySQL some versions work, some don't, and its just one of the many reasons why we don't recommend using MySQL.

Author:  brad [ Wed Mar 08, 2017 9:46 pm ]
Post subject:  Re: Timetrex Debug is unable to connect to its database

I was upgrade MySQL to version 5.7.17 try a new install but this broken again. then run the query in MySQl and show error code 1175. Searh on google and found this article.

http://stackoverflow.com/questions/1144 ... -workbench

following steps : On MysqlWorkbench

Go to Edit --> Preferences
Click to uncheck "SQL Editor" tab and uncheck "Safe Updates" check box
Query --> Reconnect to Server // logout and then login

Now execute newly the install process and this run without problem.

Thanks a lot!

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/