Ir para conteúdo
Fórum Script Brasil
  • 0

Erro ao importar arquivo.sql


reng.unip

Pergunta

Pessoal estou recebendo o seguinte erro, ao importar o arquivo de conteúdo abaixo. Estou usando Mysql Server 5.5. Alguém poderia me ajudar?

Erro:

ERROR 1064 (42000) at line 23: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL,
`job_id` tinytext NOT NULL,
`printer` tinytext NOT NULL,
`u' at line 3

Conteúdo do arquivo executado:

-- JASmine, print accounting system for Cups.
-- Copyright © Nayco.
--
-- (Please read the COPYING file)
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- Database: print
-- Table: 'jobs_log'
--
CREATE TABLE `jobs_log` (
`id` mediumint(9) NOT NULL auto_increment,
`date` timestamp(14) NOT NULL,
`job_id` tinytext NOT NULL,
`printer` tinytext NOT NULL,
`user` tinytext NOT NULL,
`server` tinytext NOT NULL,
`title` tinytext NOT NULL,
`copies` smallint(6) NOT NULL default '0',
`pages` smallint(6) NOT NULL default '0',
`options` tinytext NOT NULL,
`doc` tinytext NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Lists all the jobs successfully sent for printing';
Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Declare

`date` timestamp NOT NULL,
em vez de `date` timestamp(14) NOT NULL,

Evite usar o termo `date` ou `data` para nomes de atributos. Estas são palavras reservados do MySQL e podem te dar problemas mais a frente.

Link para o comentário
Compartilhar em outros sites

  • 0

Boa tarde, obrigado pela ajuda, mas infelizmente, mesmo após a alteração o erro ainda persiste. o conteúdo do arquivo a ser importado ao Mysql foi de autoria do desenvolvedor do Jasmine, software usado para contabilizar, junto ao CUP´s impressões. Acredito que ele deve ser adaptado a versão 5.5 do Mysql, pois na versão 5.0 me parece não dar problemas, mas infelizmente tenho instalado apenas a 5.5:

ERROR 1064 (42000) at line 23: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL,
`job_id` tinytext NOT NULL,
`printer` tinytext NOT NULL,
`u' at line 3
Link para o comentário
Compartilhar em outros sites

  • 0

Testei com a versão 5.1.24 (a que eu uso normalmente)e não tive problemas.

Vou montar um ambiente (virtual) de teste para avaliar melhor. Qual exatamente é a versão do MySQL que você usa?

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...