different reason
My problem was different. First, I hadn't used the ip address in ftp hosting to connect to the server. Second, the quoting around the password was double quotes, which allows the '$' (in the password) to be evaluated, so the password was mangled. I changed the quotes to single quotes, and it appears to be able to access the database now.