2
Is there a way to troubleshoot database connection errors?
Question asked by Pantheon - 12/22/2019 at 5:28 PM
Unanswered
I'm not sure what I'm doing wrong. You can see in the bottom right corner that it says it cannot connect to the database. You can see MySQL Workbench open with the database created called smartertrack. I also included the error log, which says the connection string has not been initialized, but I don't know what that means. The root password is correct, I have tested it over and over.

10 Replies

Reply to Thread
0
Kyle Kerst Replied
Employee Post
Hello! The connection string has not been initialized typically means the systemsettings.xml file is not present or has invalid data in it. Can you try opening the http://localhost:9996 address in a guest session to see if that loads properly? I am wondering if your systemsettings.xml file might be valid, but the error page is cached. 

Do you see any errors on the MySQL side? Also, check the folder below for the presence of error logs as they may be present: 

C:\Program Files (x86)\SmarterTools\SmarterTrack\MRS\App_Data\Logs
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Pantheon Replied

Here are the Mysql error logs.


The error log in my first screenshot is taking from the App_Data\Logs folder.

I also deleted the systemsettings.xml file and reattempted the setup wizard and it made a new systemsettings.xml file and gives the same error.
0
Kyle Kerst Replied
Employee Post
Interesting, so theres definitely something going on in the MySQL connection. Unfortunately though I can't see the error logs you provided, can you send these to me directly through here? If you can get a support ticket submitted I'm sure we can get to the bottom of this as well. Thanks in advance!
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Pantheon Replied
Do you mean the ST error log? It's just the same error over and over. Here is the entire log for today. 2019.12.23-Errors-1.log
0
Pantheon Replied
Am I supposed to use "localhost" as the server name?
0
Pantheon Replied
What about authentication type and limit to hosts settings on this page? Does this look right?

0
Kyle Kerst Replied
Employee Post
Hello and thanks for getting back to me on this. It looks like this might be one of two things:

First, MySQL may be picky about usage of localhost, so I'd like you to try with 127.0.0.1 or the local IP address of the server. 

Next, this could be a permissions issue as it looks like (from the logs) you are reaching the server, but are not able to get into the database. Can you try opening the MySQL console and then use this guide to grant full permissions to the user for that database you've created? Alternatively you should be able to give that account create/update permissions for databases and then choose a name in the setup wizard to create the account. 

Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Pantheon Replied
You can see in the screenshot below that the user "st" has full permissions on the smartertrack database. It was like this before I started this thread. I have also tried changing the password several times on this user, and have confirmed the password is working, by using the "connect to database" option in MySQL workbench. I have copy/pasted the password as well to remove any potential typos. I also made a user with full permissions on all databases and then tried to have the setup wizard create the database named "st", which doesn't exist, but it just says it cannot connect, like before. Can I just give you a remote desktop IP and login/pass so you can look at it?

0
Travis Newton Replied
Sorry to bring up an old topic, but I'm having this exact same issue. I'm using MariaDB 10.7.3. The user I created for SmarterTrack is able to login without issue but then it says it can't find the database. I've tired using the local IP, localhost, 127.0.0.1, different database, different user, and even using root and letting root create the database. The SmarterTrack installer does create the database, but then complains it doesn't exist.

In C:\ProgramFiles (x86)\SmarterTools\SmarterTrack\MRS\App_Data\Logs\ and then in the log file, I see this when I use a valid user that can connect but allegedly cannot connect to the database: 
=====================
[2022-02-21 1:37:07 PM]
Application_Start - Database is unavailable or has not been configured
I was only able to get the latest version of SmarterTrack to install on MariaDB by downgrading to MariaDB 10.5. When I did this, the installer worked perfectly. No errors.
1
Zach Sylvester Replied
Employee Post
Hey Travis, 

Thank you for reaching out. This is currently a known issue with SmarterTrack. It looks like this bug is currently in review so the fix may be added in the next release. 

Kind Regards, 
Zach Sylvester System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com

Reply to Thread