maintainDB Non-Functional Follow Answered Kris Hatcher Created May 27, 2016 21:52 I have TeamCity setup on an Amazon EC2 instance (Linux, 64-bit) and am trying to move from the internal database to an RDS MySQL instance. I have been trying to run the maintainDB.cmd file over SSH as detailed in the documentation, however whenever I attempted to run it, I received either a 'command not found' or 'permission denied' error. I've tried different user accounts, and using sudo, but nothing seemed to work. I found one article that seemed to indicate that maybe the maintainDB.cmd file was not marked with 'permission to execute', so I ran <code>chmod u+x maintainDB.cmd</code>. This only resulted in the following error: <code> maintainDB.cmd: line 1: @echo: command not found maintainDB.cmd: line 2: ::: command not found maintainDB.cmd: line 3: ::: command not found maintainDB.cmd: line 4: ::: command not found maintainDB.cmd: line 5: ::: command not found maintainDB.cmd: line 6: $'::\r': command not found maintainDB.cmd: line 7: syntax error near unexpected token `(' 'aintainDB.cmd: line 7: `:: TEAMCITY_MAINTAINDB_MEM_OPTS memory options (JVM options) </code> I'm fairly new at the back-end of TC, I've used the front end for quite some time, but haven't had to dig this deep into the internals before. I can't find anything that seems to indicate that this error should even happen, let alone how to fix it. Any help would be appreciated.