将数据导入MySQL时出现如下时区问题。
1
|
ERROR: The server time zone value 'EDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support. |
MySQL服务器无法识别JDBC driver的默认时区“EDT”,此时应指定JDBC driver的时区为“UTC”或MySQL服务器的时区。
下文以指定JDBC driver的时区为“UTC”为例进行说明。
1
|
vi my_mysql.properties
|
1
|
serverTimezone=UTC |
添加完成后如下图所示。
1
|
./runDatabaseBuild.sh my_mysql.properties
|