Upgrading MySQL from 5.0 to 5.1

2009-03-21 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=78654 Posted on behalf of 
a User

This has proved to be quite challenging. I wasn't able to do the upgrade and 
basically created another instance of 5.1 and took a backup of my database from 
5.0 and restored it to 5.1. Then added all my users, etc. There's got to be a 
better way?

I couldn't figure out how to get the new version 5.1 to see the file system 
(containing the database) that was in use by 5.0. I looked at all the documents 
and nowhere (or at least I couldn't see it) does it talk about upgrading the 
database. When you install the new version how do you get it ot upgrade and use 
the 5.0 database? Any pointers/help on this would be great for the next time I 
have to do this.

Thanks.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: copy blob between tables may get in consistent data?

2009-03-21 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=78262 Posted on behalf of 
a User

I have no problems in copying MEDIUMBLOB type data from one table to another. 
Under either 5.0 or 5.1 community editions.

In Response To: 

hi,
  I found this:  http://bugs.mysql.com/bug.php?id=34300   in the bug system.
  As it descibed, there is chance which I get corrupted data when read BLOB.
Now I wonder why I also get corrupted data when write BLOB into table...
  I tried this:
step 1: read BLOB data from TABLE1
step 2: log the BLOB data
step 3: write the data into TABLE2

  result:
select hex(data) from TABLE1   is the same as  what I've logged in step2
select hex(data) from TABLE2   is different with   select
hex(data) from TABLE2

  Any suggestions?

2009/3/19 Cui Shijun no...@spam.com:
 hi,
  I'm using mysql-5.1.22, innodb. For some reason, I need to add some
 columns to a table without locking it, so I do this:

     insert into TABLE2(col1, col2, ... ,colN) select col1, col2, ...
 colN from TABLE1 where ...(primary key traversal condition).

  which TABLE1 is under use, and TABLE2 has new structure.
  Before I really do the copy task, I created some triggers to
 synchronize the insert  update.

  When I finally complete the task, I find ALL blob column appear to
 result in inconsistent status with the orignal table.
  There are users which do query and update on TABLE1.
  So what's going wrong?

  Thank you
       Cui Shijun


--


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Replication error 1236

2008-09-16 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=46643 Posted on behalf of 
a User

HI,

first check the error log and find the position where the replication was 
terminated.Now run the mysqlbinlog utility on the binarylogs file.
Now when you run the query will get the text format as a result.serch for the 
position and see as to which query was ran on that position.check if that qurey 
ran on the slave before bcoz we dont need a duplication of thr query.If not plz 
run the query on the slave.Stop/start the slave.You sholud get the Slave back 
to SYNC.

Anup

In Response To: 

Hi All,

Once a week or so I get the following error:


080801  8:18:35 [ERROR] Error reading packet from server: error reading log
entry ( server_errno=1236)
080801  8:18:35 [ERROR] Got fatal error 1236: 'error reading log entry' from
master when reading data from binary log

Stopping the slave and restart at its current postion does not help here
(the same error happens again with next entry in bin log), the only way I
know how to fix this is to flush the logs and restart the slave with the new
log file (changes in between are manually synched).

I would appreciate any pointers about where to start looking for the
problem. E.g. is the bin log file corrupt? And if so why does this happen so
often

Thanks
Olaf



- Confidentiality Notice:
The following mail message, including any attachments, is for the
sole use of the intended recipient(s) and may contain confidential
and privileged information. The recipient is responsible to
maintain the confidentiality of this information and to use the
information only for authorized purposes. If you are not the
intended recipient (or authorized to receive information for the
intended recipient), you are hereby notified that any review, use,
disclosure, distribution, copying, printing, or action taken in
reliance on the contents of this e-mail is strictly prohibited. If
you have received this communication in error, please notify us
immediately by reply e-mail and destroy all copies of the original
message. Thank you.

-- 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Typical Maintenance for InnoDB Tables

2008-08-16 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=48414 Posted on behalf of 
a User

I have a MySQL 5.0 InnoDB database that's about 1 GB in size so it's still 
pretty tiny. Is there any performance enhancement maintenance that should be 
done on the tables? I do a weekly Optimize through the MySQL Admin tool, which 
doesn't appear to do anything, I presume it updates the table statistics. Is 
there anything else that I should do with the indexes for instance? 

Thanks for any information.

John T.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Moving Database from Windows to Linux

2008-06-26 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=42035 Posted on behalf of 
a User

Hi,

I'm running MySQL 5.0.51 Community edition. I have a half a gigabyte sized 
database that I'd like to move from a Windows 2000 based server to a Linux 
server. What's the best way to do this? I normally take complete backup using 
MySQL administrator which creates a file with sql to recreate the tables and 
insert the data. Can I simply ftp this to the Linux box and restore it to a 
database there? Is there a MySQL administrator for Linux?

Thanks



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Moving Database from Windows to Linux

2008-06-26 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=42035 Posted on behalf of 
a User

Because of the fundamental difference between binary data files under Windows 
and under Linux.


In Response To: 

At 07:09 PM 6/26/2008, you wrote:
See Thread at: http://www.techienuggets.com/Detail?tx=42035 Posted on 
behalf of a User

Hi,

I'm running MySQL 5.0.51 Community edition. I have a half a gigabyte sized 
database that I'd like to move from a Windows 2000 based server to a Linux 
server. What's the best way to do this? I normally take complete backup 
using MySQL administrator which creates a file with sql to recreate the 
tables and insert the data. Can I simply ftp this to the Linux box and 
restore it to a database there? Is there a MySQL administrator for Linux?

Thanks


Why can't you just shutdown the MySQL server and copy the data files to the 
data directory on the Linux server?

Mike 


-- 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



A SQL Query Question

2008-04-17 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=32975 Posted on behalf of 
a User

Hello everyone,

I have a table A:

userId long
picture MeduimBlob
datePosted DateTime

A userId can have many pictures posted. I want to write a query that returns a 
distinct userId along with the most recent picture posted. Can someone suggest 
an elegant and fast query to accomplish this?

Thanks

Adam



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: A SQL Query Question

2008-04-17 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=32975 Posted on behalf of 
a User

select userId, picture, MAX(datePosted) from A order by datePosted;





In Response To: 

Hello everyone,

I have a table A:

userId long
picture MeduimBlob
datePosted DateTime

A userId can have many pictures posted. I want to write a query that returns a 
distinct userId along with the most recent picture posted. Can someone suggest 
an elegant and fast query to accomplish this?

Thanks

Adam

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Server Crash

2008-02-10 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=24273 Posted on behalf of 
a User

Hi I'm running 5.0.51a on Windows machine. The server crashes with:

080210 15:56:38  InnoDB: Page checksum 2545965801, prior-to-4.0.14-form 
checksum 1667729874
InnoDB: stored checksum 1195984440, prior-to-4.0.14-form stored checksum 
1416128883
InnoDB: Page lsn 4294918911 4294967295, low 4 bytes of lsn at page end 541878627
InnoDB: Page number (if stored to page already) 962664704,
InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 4294967295
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 13178.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also InnoDB: 
http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

When I do a error check. I have full backups but when I restore the backup to 
the original schema name I get the same problem but when I restore to a new 
schema name the server works fine. I have change my programs to use the new 
schema name but I don't understand what's causing this problem? I can even 
delete the original schema name and restore the backup but it still fails.

Thanks



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Server Crash

2008-02-10 Thread samk
See Thread at: http://www.techienuggets.com/Detail?tx=24273 Posted on behalf of 
a User

Help! I'm still facing this problem. I can run a check error successfully but 
when I try to dump the database using MySQL Administrator halfway through one 
table the server crashes. See message at the end. I restart the server run a 
check error and everything checks out but it crashes again when I try and do a 
backup. I'm using Innodb and my problems appear to have started when I upgraded 
from 5.0.45 to 5.0.51a. I'm not the normal Mysql admin, who's currently not 
available. Please any help would be great.

InnoDB: stored checksum 4292411360, prior-to-4.0.14-form stored checksum 
544367987
InnoDB: Page lsn 6553600 4293656593, low 4 bytes of lsn at page end 1869967971
InnoDB: Page number (if stored to page already) 1067590,
InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 19200
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 13375.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also InnoDB: 
http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

In Response To: 

Hi I'm running 5.0.51a on Windows machine. The server crashes with:

080210 15:56:38  InnoDB: Page checksum 2545965801, prior-to-4.0.14-form 
checksum 1667729874
InnoDB: stored checksum 1195984440, prior-to-4.0.14-form stored checksum 
1416128883
InnoDB: Page lsn 4294918911 4294967295, low 4 bytes of lsn at page end 541878627
InnoDB: Page number (if stored to page already) 962664704,
InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 4294967295
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 13178.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also InnoDB: 
http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

When I do a error check. I have full backups but when I restore the backup to 
the original schema name I get the same problem but when I restore to a new 
schema name the server works fine. I have change my programs to use the new 
schema name but I don't understand what's causing this problem? I can even 
delete the original schema name and restore the backup but it still fails.

Thanks

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]