Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: problem z importem .sql
Forum PHP.pl > Forum > Bazy danych
pawel90
Witam, pobrałem pewien skrypt i aby go zainstalować trzeba zaimportować plik "plik.sql" do db. Testuje ten skrypt na krasnal serv-ie. Podczas importowania plik.sql wyskakuje błąd:

Cytat
Błąd
zapytanie SQL:

-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 12, 2008 at 10:05 PM
-- Server version: 4.1.22
-- PHP Version: 5.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySQL zwrócił komunikat:

#1064 - Something is wrong in your syntax obok 'SQL_MODE="NO_AUTO_VALUE_ON_ZERO"' w linii 10


Zawartość plik.sql

  1. -- phpMyAdmin SQL Dump
  2. -- version 2.11.4
  3. -- <a href="http://www.phpmyadmin.net" target="_blank">http://www.phpmyadmin.net</a>
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Mar 12, 2008 at 10:05 PM
  7. -- Server version: 4.1.22
  8. -- PHP Version: 5.2.3
  9.  
  10. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  11.  
  12. --
  13. -- Database: `runbitch_torrent`
  14. --
  15.  
  16. -- --------------------------------------------------------
  17.  
  18. --
  19. -- Table structure for table `torrent_tags`
  20. --
  21.  
  22. CREATE TABLE `torrent_tags` (
  23. `tag_id` int(11) NOT NULL AUTO_INCREMENT,
  24. `tag_name` text NOT NULL,
  25. `count` int(11) DEFAULT '0',
  26. `search_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  27. PRIMARY KEY (`tag_id`)
  28. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1470 ;
  29.  
  30. --
  31. -- Dumping data for table `torrent_tags`
  32. --
  33.  
  34. INSERT INTO `torrent_tags` VALUES(1432, 'klaxxon', 9, '2008-03-11 16:06:52');
  35. INSERT INTO `torrent_tags` VALUES(1428, 'rihanna', 3, '2008-03-11 15:57:56');
  36. INSERT INTO `torrent_tags` VALUES(1429, 'armin+van+buuren', 41, '2008-03-11 16:01:35');
  37. INSERT INTO `torrent_tags` VALUES(1430, 'no+land', 2, '2008-03-11 16:02:26');
  38. INSERT INTO `torrent_tags` VALUES(1431, 'axxo', 20, '2008-03-11 16:02:44');
  39. INSERT INTO `torrent_tags` VALUES(1433, 'jay+z', 1, '2008-03-11 18:37:47');
  40. INSERT INTO `torrent_tags` VALUES(1434, 'movies', 1, '2008-03-11 18:37:54');
  41. INSERT INTO `torrent_tags` VALUES(1435, 'akon', 3, '2008-03-12 05:47:51');
  42. INSERT INTO `torrent_tags` VALUES(1436, 'lost', 14, '2008-03-12 11:29:04');
  43. INSERT INTO `torrent_tags` VALUES(1437, 'heroes+season+1', 2, '2008-03-12 11:48:36');
  44. INSERT INTO `torrent_tags` VALUES(1438, 'how+i+met+your+mother', 3, '2008-03-12 11:50:35');
  45. INSERT INTO `torrent_tags` VALUES(1439, 'mrs+vette', 2, '2008-03-12 12:13:43');
  46. INSERT INTO `torrent_tags` VALUES(1440, 'adobe', 3, '2008-03-12 12:14:02');
  47. INSERT INTO `torrent_tags` VALUES(1441, 'sexy', 2, '2008-03-12 12:14:18');
  48. INSERT INTO `torrent_tags` VALUES(1442, 'mentalism', 2, '2008-03-12 12:14:45');
  49. INSERT INTO `torrent_tags` VALUES(1443, 'banned%2C', 2, '2008-03-12 12:16:46');
  50. INSERT INTO `torrent_tags` VALUES(1444, 'banned', 2, '2008-03-12 12:16:46');
  51. INSERT INTO `torrent_tags` VALUES(1445, 'magick', 2, '2008-03-12 12:18:38');
  52. INSERT INTO `torrent_tags` VALUES(1446, 'callalily', 2, '2008-03-12 12:40:47');
  53. INSERT INTO `torrent_tags` VALUES(1447, 'fergie', 2, '2008-03-12 12:40:58');
  54. INSERT INTO `torrent_tags` VALUES(1448, 'poetry', 1, '2008-03-12 13:00:21');
  55. INSERT INTO `torrent_tags` VALUES(1449, 'nude+blonde', 2, '2008-03-12 13:00:34');
  56. INSERT INTO `torrent_tags` VALUES(1450, 'sims', 8, '2008-03-12 13:09:19');
  57. INSERT INTO `torrent_tags` VALUES(1451, 'for+old', 1, '2008-03-12 13:26:10');
  58. INSERT INTO `torrent_tags` VALUES(1452, 'no+country+for+old+men', 2, '2008-03-12 13:26:24');
  59. INSERT INTO `torrent_tags` VALUES(1453, 'mastilan', 1, '2008-03-12 14:02:14');
  60. INSERT INTO `torrent_tags` VALUES(1454, 'mastiland', 45, '2008-03-12 14:02:24');
  61. INSERT INTO `torrent_tags` VALUES(1455, 'shakira', 1, '2008-03-12 14:12:09');
  62. INSERT INTO `torrent_tags` VALUES(1456, 'spidemar', 1, '2008-03-12 14:29:50');
  63. INSERT INTO `torrent_tags` VALUES(1457, 'spiderman', 1, '2008-03-12 14:30:23');
  64. INSERT INTO `torrent_tags` VALUES(1458, 'american+idol', 3, '2008-03-12 14:34:06');
  65. INSERT INTO `torrent_tags` VALUES(1459, 'pamela', 2, '2008-03-12 16:55:20');
  66. INSERT INTO `torrent_tags` VALUES(1460, 'games', 1, '2008-03-12 18:07:42');
  67. INSERT INTO `torrent_tags` VALUES(1461, 'pleasanton+ca+real+estate', 2, '2008-03-12 18:17:07');
  68. INSERT INTO `torrent_tags` VALUES(1462, 'dvdrip', 1, '2008-03-12 19:43:46');
  69. INSERT INTO `torrent_tags` VALUES(1463, 'seoelite', 2, '2008-03-12 20:42:56');
  70. INSERT INTO `torrent_tags` VALUES(1464, 'xxx', 1, '2008-03-12 20:43:01');
  71. INSERT INTO `torrent_tags` VALUES(1465, 'im1', 1, '2008-03-12 20:57:21');
  72. INSERT INTO `torrent_tags` VALUES(1466, 'prison+break', 3, '2008-03-12 20:57:30');
  73. INSERT INTO `torrent_tags` VALUES(1467, 'no+country+for+old+man', 1, '2008-03-12 21:00:26');
  74. INSERT INTO `torrent_tags` VALUES(1468, 'norton', 2, '2008-03-12 21:39:14');
  75. INSERT INTO `torrent_tags` VALUES(1469, 'ali+b', 1, '2008-03-12 21:42:23');



Z góry dzięki za pomoc smile.gif
kilas88
wywal z 10 linii:
Kod
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

biggrin.gif
pawel90
@up po wywaleniu

Cytat
Błąd
zapytanie SQL:

-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 12, 2008 at 10:05 PM
-- Server version: 4.1.22
-- PHP Version: 5.2.3
--
-- Database: `runbitch_torrent`
--
-- --------------------------------------------------------
--
-- Table structure for table `torrent_tags`
--
CREATE TABLE `torrent_tags` (

`tag_id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`tag_name` text NOT NULL ,
`count` int( 11 ) default '0',
`search_date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY ( `tag_id` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1470
MySQL zwrócił komunikat:

#1064 - Something is wrong in your syntax obok 'ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1470 ' w linii 28
kilas88
Paweł, masz już 20 lat, powinieneś choć trochę umieć czytać po angielsku (czy używać translatora).

Cytat
#1064 - Something is wrong in your syntax obok 'ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1470 ' w linii 28


Pozdrawiam.
mkozak
A przypadkiem nie chodzi o jakąś niezgodność wersji mysql-a??

Dump masz z jakiejś starej wersji 4.x, a na jaką wgrywasz??
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.