当我试图在使用MySQL的cloudfoundry上运行我的页面时,我收到了这个错误
org.springframework.jdbc.CannotGetJdbcConnectionException:
Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException:
Cannot create PoolableConnectionFactory (Unknown initial character set index '192' received from server.
Initial client character set can be forced via the 'characterEncoding' property.)
我错过了什么? 我确实在下面尝试从我的UTF-8更改为LATIN,仍然收到错误
ALTER TABLE t MODIFY col1 VARCHAR(50) CHARACTER SET latin1;
感谢所有回复
我看到了
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
来自cloudfoundry数据库的
答案 0 :(得分:3)
我正在使用 mysql-connector-java-3.1.7-bin.jar ,并在更改为 mysql-connector-java-5.1.21-bin.jar后它运作良好。 TQ
答案 1 :(得分:2)
在/ etc / mysql中检查你的配置下面的行。评论他们并再试一次。您必须重新启动mysql服务(/ bin / vcap restart)。
collation_server = utf8_unicode_ci
character_set_server = utf8