For anyone else stumbling across this thread when googling for this annoying problem: the issue here is that using special characters in your password on the DataSource line is broken: Can't use special character in password in the DataSource property · Issue #1541 · mattermost/mattermost · GitHub
As stupid as that is, the easiest way to work around it is to set a password consisting of just alphanumeric characters. You shouldn’t have much use for it outside this anyway, so at least you can make it loooooong so as not to make it ridiculously insecure.