Database connection error

Discussion forum about Anuko Time Tracker
Post Reply
kbray
Posts: 1
Joined: Tue Dec 08, 2020 3:38 pm

Database connection error

Post by kbray » Tue Dec 08, 2020 3:47 pm

Hello, I am trying to setup Time tracker and keep having issues with the dbinstall.php

I have setup a database through SQL Server Management Studio. I have checked and I can connect to the database with the username and password using ODBC. using the dbinstall.php I get this response...

Environment Checks
WEB-INF/templates_c/ directory is writable.
WEB-INF/config.php file exists.
DSN is defined.
PHP version: 7.3.13, good enough.
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Error: connection to database failed. MDB2 Error: unknown error

config.php has been changed to..

define('DSN','mysqli://user:password@WEBSRV/anuko?charset=utf8mb4');

WEBSRV is the instance in SQL Server Management Studio, anuko is the name of the database.

I have tried variation after variation of paths in the database portion including 'localhost'

In SQL Server Management Studio in the Object Explorer I have the database engine listed as WEBSRV\SQLEXPRESS. Under the Databases folder my database is listed as 'anuko'

wrc
Posts: 307
Joined: Tue May 25, 2010 8:30 pm

Re: Database connection error

Post by wrc » Tue Dec 08, 2020 3:52 pm

kbray wrote:
Tue Dec 08, 2020 3:47 pm
I have setup a database through SQL Server Management Studio.
If you are trying to use MSSQL it won't work with Time Tracker. Use MariaDB or MySQL instead.

richard
Posts: 14
Joined: Sun May 29, 2016 9:55 am

Re: Database connection error

Post by richard » Thu Dec 31, 2020 12:32 pm

I got the same error when updating from 1.19.7.5051 to the latest version 1.19.23.5409 (using MySQL):

I clicked "Update database structure (v1.19 to v1.19.23)", after that I see

WEB-INF/templates_c/ directory is writable.
WEB-INF/config.php file exists.
DSN is defined.
PHP version: 7.1.33, good enough.
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Connection to database successful.
There are 7 tables in database.
Error: database schema version query failed. MDB2 Error: no such table

When I login I only see "MDB2 Error: no such table"

What is going wrong?

richard
Posts: 14
Joined: Sun May 29, 2016 9:55 am

Re: Database connection error

Post by richard » Thu Dec 31, 2020 2:00 pm

Forget my post please, I made a mistake ;-)
Happy 2021!

Post Reply