• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Blad z przenoszeniem bazy danych

john290

Banned User
Joined
May 22, 2008
Messages
291
Reaction score
0
Location
Podkarpacie, Krosno
Witam!

Miałem w kimsumi.pl dedyk XL, teraz kupilem w ovh.pl dedyk large i chcialbym przeniesc na niego baze danych.
Wszystko dziala dobrze ale przy przenoszeniu tabeli players mam blad
Code:
Duplicate entry '2-0' for key 1

Daje wam poczatek tabeli players, do 6 pierwszych graczy.W prawdziwej bazie danych mam 2000 graczy ale nie moge ich tu podac bo ich dane byly by narazone.

Code:
--
-- Struktura tabeli dla  `players`
--

CREATE TABLE IF NOT EXISTS `players` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `world_id` tinyint(2) unsigned NOT NULL default '0',
  `group_id` int(11) NOT NULL default '1',
  `account_id` int(11) NOT NULL default '0',
  `level` int(11) NOT NULL default '1',
  `vocation` int(11) NOT NULL default '0',
  `health` int(11) NOT NULL default '150',
  `healthmax` int(11) NOT NULL default '150',
  `experience` bigint(20) NOT NULL default '0',
  `lookbody` int(11) NOT NULL default '0',
  `lookfeet` int(11) NOT NULL default '0',
  `lookhead` int(11) NOT NULL default '0',
  `looklegs` int(11) NOT NULL default '0',
  `looktype` int(11) NOT NULL default '136',
  `lookaddons` int(11) NOT NULL default '0',
  `maglevel` int(11) NOT NULL default '0',
  `mana` int(11) NOT NULL default '0',
  `manamax` int(11) NOT NULL default '0',
  `manaspent` int(11) NOT NULL default '0',
  `soul` int(10) unsigned NOT NULL default '0',
  `town_id` int(11) NOT NULL default '0',
  `posx` int(11) NOT NULL default '0',
  `posy` int(11) NOT NULL default '0',
  `posz` int(11) NOT NULL default '0',
  `conditions` blob NOT NULL,
  `cap` int(11) NOT NULL default '0',
  `sex` int(11) NOT NULL default '0',
  `lastlogin` bigint(20) unsigned NOT NULL default '0',
  `lastip` int(10) unsigned NOT NULL default '0',
  `save` tinyint(1) NOT NULL default '1',
  `redskull` tinyint(1) NOT NULL default '0',
  `redskulltime` bigint(20) NOT NULL default '0',
  `rank_id` int(11) NOT NULL default '0',
  `guildnick` varchar(255) NOT NULL default '',
  `lastlogout` bigint(20) unsigned NOT NULL default '0',
  `blessings` tinyint(2) NOT NULL default '0',
  `balance` bigint(20) NOT NULL default '0',
  `stamina` bigint(20) NOT NULL default '151200000' COMMENT 'stored in miliseconds',
  `direction` int(11) NOT NULL default '2',
  `loss_experience` int(11) NOT NULL default '100',
  `loss_mana` int(11) NOT NULL default '100',
  `loss_skills` int(11) NOT NULL default '100',
  `loss_containers` int(11) NOT NULL default '100',
  `loss_items` int(11) NOT NULL default '100',
  `premend` int(11) NOT NULL default '0' COMMENT 'NOT IN USE BY THE SERVER',
  `online` tinyint(1) NOT NULL default '0',
  `marriage` int(10) unsigned NOT NULL default '0',
  `promotion` int(11) NOT NULL default '0',
  `deleted` tinyint(1) NOT NULL default '0',
  `description` varchar(255) NOT NULL default '',
  `created` int(11) NOT NULL default '0',
  `nick_verify` int(11) NOT NULL default '0',
  `old_name` varchar(255) NOT NULL default '',
  `hide_char` int(11) NOT NULL default '0',
  `comment` text NOT NULL,
  `exphist_lastexp` bigint(255) NOT NULL default '0',
  `exphist1` bigint(255) NOT NULL default '0',
  `exphist2` bigint(255) NOT NULL default '0',
  `exphist3` bigint(255) NOT NULL default '0',
  `exphist4` bigint(255) NOT NULL default '0',
  `exphist5` bigint(255) NOT NULL default '0',
  `exphist6` bigint(255) NOT NULL default '0',
  `exphist7` bigint(255) NOT NULL default '0',
  `onlinetimetoday` bigint(255) NOT NULL default '0',
  `onlinetime1` bigint(255) NOT NULL default '0',
  `onlinetime2` bigint(255) NOT NULL default '0',
  `onlinetime3` bigint(255) NOT NULL default '0',
  `onlinetime4` bigint(255) NOT NULL default '0',
  `onlinetime5` bigint(255) NOT NULL default '0',
  `onlinetime6` bigint(255) NOT NULL default '0',
  `onlinetime7` bigint(255) NOT NULL default '0',
  `onlinetimeall` bigint(255) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`,`deleted`),
  KEY `account_id` (`account_id`),
  KEY `group_id` (`group_id`),
  KEY `online` (`online`),
  KEY `deleted` (`deleted`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2585 ;

--
-- Triggers `players`
--
DROP TRIGGER IF EXISTS `tfs`.`oncreate_players`;
DELIMITER //
CREATE TRIGGER `tfs`.`oncreate_players` AFTER INSERT ON `tfs`.`players`
 FOR EACH ROW BEGIN
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
	INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `tfs`.`ondelete_players`;
DELIMITER //
CREATE TRIGGER `tfs`.`ondelete_players` BEFORE DELETE ON `tfs`.`players`
 FOR EACH ROW BEGIN
	DELETE FROM `bans` WHERE `type` = 2 AND `value` = OLD.`id`;
	UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END
//
DELIMITER ;

--
-- Zrzut danych tabeli `players`
--

INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `redskull`, `redskulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`, `exphist_lastexp`, `exphist1`, `exphist2`, `exphist3`, `exphist4`, `exphist5`, `exphist6`, `exphist7`, `onlinetimetoday`, `onlinetime1`, `onlinetime2`, `onlinetime3`, `onlinetime4`, `onlinetime5`, `onlinetime6`, `onlinetime7`, `onlinetimeall`) VALUES
(1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', 0, 0, '', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(2, 'Rook Sample', 0, 1, 1, 1, 0, 185, 185, 0, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 160, 54, 7, '', 420, 1, 1247907921, 173493717, 1, 0, 0, 0, '', 1247907927, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1247864667, 1, '', 1, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(3, 'Sorcerer Sample', 0, 1, 1, 1, 1, 185, 185, 0, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 160, 54, 7, '', 420, 1, 1247904797, 173493717, 1, 0, 0, 0, '', 1247904817, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1247864667, 1, '', 1, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(4, 'Druid Sample', 0, 1, 1, 1, 2, 185, 185, 0, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 157, 55, 7, '', 420, 1, 1248113962, 173493717, 1, 0, 0, 0, '', 1248113964, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1247864667, 1, '', 1, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(5, 'Paladin Sample', 0, 1, 1, 1, 3, 185, 185, 0, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 160, 54, 7, '', 420, 1, 1247904773, 173493717, 1, 0, 0, 0, '', 1247904794, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1247864667, 1, '', 1, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(6, 'Knight Sample', 0, 1, 1, 1, 4, 185, 185, 0, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 161, 54, 7, '', 420, 1, 1248028264, 173493717, 1, 0, 0, 0, '', 1248028265, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1247864667, 1, '', 1, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),

Prosilbym o pomoc! Dziex!
 
eksport:
Code:
mysqldump -u root -pHASLO NAZWABAZY > NAZWABAZY.sql
import:
Code:
mysql -u root -p NAZWABAZY < NAZWABAZY.sql

powinno byc ok
 
Taki błąd:
ks302627:~# mysqldump -u root -p xxxx tfs > tfs.sql
Enter password:
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
 
s302627:~# mysqldump -u root -p xxx tfs > tfs.sql
Enter password:
mysqldump: Got error: 1049: Unknown database 'xxx' when selecting the database
 
o kuzwa ;/
po przeniesieniu nikt sie lognac nie moze
Code:
OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: unrecognized token: "';''" (SELECT "id" FROM "accounts" WHERE "name" LIKE ';'')

pomoc szybko plx ;/
 
Help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help help
 
to Ty w koncu uzywasz mysql czy sqlite? :) moze nie skompilowales z obsluga mysql, albo w config.lua masz zle wpisane
 
no wiec zapewne nie skompilowales z obsluga mysql, pokaz komende jaka wpisales po ./autogen.sh (o ile uzywasz 0.3+)
 
Back
Top