{"action":"closed","issue":{"url":"https://api.github.com/repos/nukeviet/nukeviet/issues/1891","repository_url":"https://api.github.com/repos/nukeviet/nukeviet","labels_url":"https://api.github.com/repos/nukeviet/nukeviet/issues/1891/labels{/name}","comments_url":"https://api.github.com/repos/nukeviet/nukeviet/issues/1891/comments","events_url":"https://api.github.com/repos/nukeviet/nukeviet/issues/1891/events","html_url":"https://github.com/nukeviet/nukeviet/issues/1891","id":148256251,"number":1891,"title":"[DB] Cơ chế xuất file DB tự sao lưu dễ bị lỗi khi Import","user":{"login":"anhyeuviolet","id":6290970,"avatar_url":"https://avatars.githubusercontent.com/u/6290970?v=3","gravatar_id":"","url":"https://api.github.com/users/anhyeuviolet","html_url":"https://github.com/anhyeuviolet","followers_url":"https://api.github.com/users/anhyeuviolet/followers","following_url":"https://api.github.com/users/anhyeuviolet/following{/other_user}","gists_url":"https://api.github.com/users/anhyeuviolet/gists{/gist_id}","starred_url":"https://api.github.com/users/anhyeuviolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhyeuviolet/subscriptions","organizations_url":"https://api.github.com/users/anhyeuviolet/orgs","repos_url":"https://api.github.com/users/anhyeuviolet/repos","events_url":"https://api.github.com/users/anhyeuviolet/events{/privacy}","received_events_url":"https://api.github.com/users/anhyeuviolet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-14T05:26:53Z","updated_at":"2016-04-14T12:17:34Z","closed_at":"2016-04-14T12:17:34Z","body":"XAMPP 1.8.3\r\nNV 4.0.27\r\n\r\nKhi dùng DB trong mục dump backups, DB có kèm dòng sau\r\n```\r\nSET SESSION `character_set_client`='utf8';\r\nSET SESSION `character_set_results`='utf8';\r\nSET SESSION `character_set_connection`='utf8';\r\nSET SESSION `collation_connection`='utf8mb4_unicode_ci';\r\nSET NAMES 'utf8';\r\nALTER DATABASE DEFAULT CHARACTER SET `utf8` COLLATE `utf8mb4_unicode_ci`;\r\n```\r\nCác dòng này thường sinh lỗi khi import DB vào SQL.\r\n```\r\nError\r\n\r\nSQL query:\r\n\r\nALTER DATABASE DEFAULT CHARACTER SET `utf8` COLLATE `utf8mb4_unicode_ci`;\r\n\r\nMySQL said: Documentation\r\n#1253 - COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'utf8' \r\n```\r\n\r\nTrong khi dùng phpMyAdmin thì như này\r\n\r\n```\r\nSET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\r\nSET time_zone = \"+00:00\";\r\n\r\n\r\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\r\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\r\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\r\n/*!40101 SET NAMES utf8mb4 */;\r\n```\r\nImport rất tiện. \r\nMình nghĩ nên điều chỉnh lại. Vấn đề này gặp cả khi dùng chức năng tải về trong ACP."}}