Cant connect to MYSQL after update to 4.2

Anton Tananaev6 years ago

It means that your config file is invalid.

Dr Panos6 years ago

I can't figure out what is not valid
the only change in the file is this :

<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:/home/user/Documents/traccar/target/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>

to this

<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://localhost:3306/mytraccardb?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>root</entry> 
<entry key='database.password'>******************</entry>

How is possible to not working??

Anton Tananaev6 years ago

It's easily possible if you have some typo or your text editor messes up with content.

Dr Panos6 years ago

Can you suggest compatible editor ?

Anton Tananaev6 years ago

Any text editor that doesn't modify your content for you would do.

Castillo6 years ago

@Panagiotis

Change localhost for 127.0.0.1

<entry key='database.url'>jdbc:mysql://localhost:3306/
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/

I fix it changing it

Dr Panos6 years ago

@Castillo Thanks for the advice but I already solved it.
Anton was right. The problem was the password. The copy-paste from the text editor was creating this issue. When I wrote manually a more simple password without many special characters the problem solved.

Omar Riffo3 years ago

@Castillo Thanks so much!... that did the trick!... after an SO update, the app stop working, after a while, I found the solution on your post!

Castillo3 years ago

@Omar Riffo @Dr Panos

I am very glad it worked for you