karlos17 Posted February 16, 2017 Share Posted February 16, 2017 Olá, Estou tentando importar o banco de dados e aparece o seguinte erro: Erro Comando SQL: -- -- Banco de Dados: `u298661020_xx` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `cz_accua_forms_submissions` -- CREATE TABLE IF NOT EXISTS `cz_accua_forms_submissions` ( `afs_id` bigint(20) NOT NULL AUTO_INCREMENT, `afs_form_id` varchar(77) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `afs_post_id` bigint(20) NOT NULL DEFAULT '0', `afs_ip` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `afs_uri` text COLLATE utf8mb4_unicode_520_ci NOT NULL, `afs_referrer` text COLLATE utf8mb4_unicode_520_ci NOT NULL, `afs_lang` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '', `afs_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `afs_submitted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `afs_status` tinyint(1) NOT NULL DEFAULT '0', `afs_stats` text COLLATE utf8mb4_unicode_520_ci NOT NULL, PRIMARY KEY (`afs_id`), KEY `form` (`afs_form_id`,`afs_status`), KEY `uri` (`afs[...] Mensagens do MySQL : Documentação #1273 - Unknown collation: 'utf8mb4_unicode_520_ci' Por favor, alguém pode me ajudar? Desde já, obrigado. 0 Quote Link to comment Share on other sites More sharing options...
Matheus Oliveira Posted February 16, 2017 Share Posted February 16, 2017 Veja se uma dessas duas soluções ajuda:1ª OPÇÃO: Crie um script PHP com o seguinte código, e preencha as informações do banco de dados. Isso irá alterar a codificação do mesmo. <!DOCTYPE html> <html> <head> <title>DB-Convert</title> <style> body { font-family:"Courier New", Courier, monospace;" } </style> </head> <body> <h1>Convert your Database to utf8_general_ci!</h1> <form action="db-convert.php" method="post"> dbname: <input type="text" name="dbname"><br> dbuser: <input type="text" name="dbuser"><br> dbpass: <input type="text" name="dbpassword"><br> <input type="submit"> </form> </body> </html> <?php if ($_POST) { $dbname = $_POST['dbname']; $dbuser = $_POST['dbuser']; $dbpassword = $_POST['dbpassword']; $con = mysql_connect('localhost',$dbuser,$dbpassword); if(!$con) { echo "Cannot connect to the database ";die();} mysql_select_db($dbname); $result=mysql_query('show tables'); while($tables = mysql_fetch_array($result)) { foreach ($tables as $key => $value) { mysql_query("ALTER TABLE $value CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"); }} echo "<script>alert('The collation of your database has been successfully changed!');</script>"; } ?> Depois, é só executar o mesmo. 2ª OPÇÃO: 1) Clique na aba "Export/Exportar" no banco de dados 2) Clique em "Custom/Operação customizada" 3) Vá até a seção chamada "Opções de formato específicas/Format-specific options" e altere para "Sistema de banco de dados ou servidor MySQL anterior/Database system or older MySQL server to maximize output compatibility with:" deNONE para MYSQL40. 4) Clique em "GO". * Recomendo que faça backup do banco de dados antes de qualquer alteração dessas. Fonte: http://stackoverflow.com/questions/29916610/1273-unknown-collation-utf8mb4-unicode-ci-cpanel Abs 0 Quote Link to comment Share on other sites More sharing options...
edinaldo Posted February 17, 2017 Share Posted February 17, 2017 Faz a exportação novamente e utiliza as seguintes opções: 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.