FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 10-30-2008, 12:44 PM
Tom Brown
 
Default mysql 4 > 5 export import issue

you are inserting multiple duplicate values somewhere where its not
allowed. without looking at your schema it would be hard to work out
what the issue is.


its a bayes db for spamassassin



in other news, you dont need to dump + reload when you move from
mysql-4 to mysql-5, just service mysqld stop; yum update mysql*;
/usr/bin/mysql_upgrade ; service mysqld start





i am changing the actual box so i have to dump and then import as i am
also moving from centos4 to 5 -


schema is below.... thanks

-- MySQL dump 10.9
--
-- Host: localhost Database: spamassassin
-- ------------------------------------------------------
-- Server version 4.1.13-max

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;

/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `bayes_expire`
--

DROP TABLE IF EXISTS `bayes_expire`;
CREATE TABLE `bayes_expire` (
`id` int(11) NOT NULL default '0',
`runtime` int(11) NOT NULL default '0',
KEY `bayes_expire_idx1` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `bayes_global_vars`
--

DROP TABLE IF EXISTS `bayes_global_vars`;
CREATE TABLE `bayes_global_vars` (
`variable` varchar(30) NOT NULL default ',
`value` varchar(200) NOT NULL default ',
PRIMARY KEY (`variable`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `bayes_seen`
--

DROP TABLE IF EXISTS `bayes_seen`;
CREATE TABLE `bayes_seen` (
`id` int(11) NOT NULL default '0',
`msgid` varchar(200) character set latin1 collate latin1_bin NOT NULL
default ',

`flag` char(1) NOT NULL default ',
PRIMARY KEY (`id`,`msgid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `bayes_token`
--

DROP TABLE IF EXISTS `bayes_token`;
CREATE TABLE `bayes_token` (
`id` int(11) NOT NULL default '0',
`token` char(5) NOT NULL default ',
`spam_count` int(11) NOT NULL default '0',
`ham_count` int(11) NOT NULL default '0',
`atime` int(11) NOT NULL default '0',
PRIMARY KEY (`id`,`token`),
KEY `bayes_token_idx1` (`token`),
KEY `bayes_token_idx2` (`id`,`atime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `bayes_vars`
--

DROP TABLE IF EXISTS `bayes_vars`;
CREATE TABLE `bayes_vars` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(200) NOT NULL default ',
`spam_count` int(11) NOT NULL default '0',
`ham_count` int(11) NOT NULL default '0',
`token_count` int(11) NOT NULL default '0',
`last_expire` int(11) NOT NULL default '0',
`last_atime_delta` int(11) NOT NULL default '0',
`last_expire_reduce` int(11) NOT NULL default '0',
`oldest_token_age` int(11) NOT NULL default '2147483647',
`newest_token_age` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `bayes_vars_idx1` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-30-2008, 12:52 PM
Karanbir Singh
 
Default mysql 4 > 5 export import issue

Tom Brown wrote:
in other news, you dont need to dump + reload when you move from
mysql-4 to mysql-5, just service mysqld stop; yum update mysql*;
/usr/bin/mysql_upgrade ; service mysqld start





i am changing the actual box so i have to dump and then import as i am
also moving from centos4 to 5 -


rsync or tar the /var/lib/mysql dir up and move that. I am guessing in
this case that some delimiter is breaking or the dump you did wasent clean.


Alternatively if you did use complete-inserts in your dump, you can run
the load with : mysql -f db_name < blah.sql ; then look at what lines
the load breaks on and make sure the data looks sane in those lines.


--
Karanbir Singh : http://www.karan.org/ : 2522219@icq
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-30-2008, 01:17 PM
"Matt Shields"
 
Default mysql 4 > 5 export import issue

On Thu, Oct 30, 2008 at 9:52 AM, Karanbir Singh <mail-lists@karan.org> wrote:

Tom Brown wrote:



in other news, you dont need to dump + reload when you move from mysql-4 to mysql-5, just service mysqld stop; yum update mysql*; /usr/bin/mysql_upgrade ; service mysqld start








i am changing the actual box so i have to dump and then import as i am also moving from centos4 to 5 -




rsync or tar the /var/lib/mysql dir up and move that. I am guessing in this case that some delimiter is breaking or the dump you did wasent clean.


But make sure mysqld is not running on either box when doing it this way.* Also, if you have any innodb tables you must have the exact same innodb settings in your /etc/my.cnf
--

-matt

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org