mysql出現Unknown or incorrect time zone: 'NULL'
使用navicat匯入資料時發生錯誤。
原因:時區設定錯誤。
檢視方法:
show variables like '%time_zone%';
結果:
發現系統時區為空。
設定時區:
修改my.cnf檔案(windows中是my.ini檔案)
一定要加在 [mysqld] 下面,否則會出現 unknown variable ‘default-time-zone=+8:00’
default-time-zone = '+8:00'
也可以通過命令設定全域性變數值
set GLOBAL time_zone = '+8:00';
每個客戶端連線有自己的時區設定,用會話time_zone變數給出。其初使值與全域性變數time_zone相同,可以用下面命令進行修改:
SET time_zone = '+8:00';
可以用下面的方法查詢當前的全域性變數值和每個連線的時區:
SELECT @@global.time_zone, @@session.time_zone;
相關文章
- MySQL案例-TIMESTAMP NOT NULL與NULLMySqlNull
- Zabbix配置Web頁面報錯" PHP time zone unknown Fail"WebPHPAI
- 【mysql】關於連線mysql資料庫時出現的時區錯誤time zoneMySql資料庫
- timestamp with local time zone型別和timestamp with time zone型別
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- MYSQL timestamp NOT NULL插入NULL的報錯問題MySqlNull
- 6、TIMESTAMP WITH TIME ZONE和TIMESTAMP WITH LOCAL TIME ZONE的實踐理解
- JavaScript getTimezoneOffset()JavaScript
- oracle time_zone!Oracle
- Oracle TimezoneOracle
- oracle之time zone時區timestamp with time zone相關的概念之一Oracle
- JDBC:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.JDBCServerZed
- oracle time_zone(zt)Oracle
- 轉:Oracle TimeZoneOracle
- Invalid time zone indicator ‘ ‘Indicator
- linux timezoneLinux
- Server returns invalid timezone. Need to set ‘serverTimezone‘ property. Idea連線mysql報錯問題ServerIdeaMySql
- ORACLE 時間與時區(Time and Time Zone)Oracle
- Need to set ‘serverTimezone‘ propertyServer
- Setting the Database Time Zone (80)Database
- 故障分析 | MySQL 遷移後 timestamp 列 cannot be nullMySqlNull
- MySQL, Incorrect usage of UNION and ORDER BYMySql
- TIMESTAMP和TIMESTAMP WITH TIME ZONE之間的總結
- oracle plsql定義date_timestamp_with time zoneOracleSQL
- Getting NOW() in your preferred time zone
- Specifying the Database Time Zone File (81)Database
- mysql執行報The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one tim......MySqlServerZed
- MySQL NULLMySqlNull
- BUG: JS 修改Date的TimezoneJS
- Oracle的時區問題Time ZoneOracle
- redhat 5.5 time zone configurationRedhat
- mysql探究之null與not nullMySqlNull
- `jsonb` 報錯 `invalid input syntax for type timestamp with time zone ““JSON
- Oracle timezone的相關知識Oracle
- MySQL中is not null和!=null和<>null的區別MySqlNull
- ORA-39322: Cannot use transportable tablespace with timestamp with timezone...
- ntpdate會導致mysql slow query log出現很大的query timeMySql
- mysql Unknown error 1054MySqlError