RE: Recover Records
Just convert your binary log file into sql file using mysqlbinlog tools and search the deleted record between 12 AM to 2 AM and reinsert it. Jeetendra Ranjan MySQL DBA --- On Thu, 26/8/10, Kranthi wrote: From: Kranthi Subject: RE: Recover Records To: "'Jangita'" Cc: mysql@lists.mysql.com Date: Thursday, 26 August, 2010, 4:20 PM Thank u Janqita, I can get Regards , Kranthi -Original Message- From: Jangita [mailto:jang...@jangita.com] Sent: Thursday, August 26, 2010 3:33 PM To: mysql@lists.mysql.com Subject: Re: Recover Records On 26/08/2010 11:35 a, Kranthi wrote: > Hi all, > > My database size is 1gb.I take backup at 12 am and unfortunately > I deleted 8 records at 2 am . I checked 8 records in 12 am backup , that 8 > records are not there, I think that 8 records inserted between 12 am to 2 > am. I am maintaining log file how can I recover particular records. > Is it a binary log? if so use mysqlbinlog to search for the insert statements and re-insert them. -- Jangita | +256 76 91 8383 | Y! & MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=kranthi_penty...@iicindia.com -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=jitendra_ran...@yahoo.com
RE: Recover Records
Just convert your binary log file into sql file using mysqlbinlog tools and search the deleted record between 12 AM to 2 AM and reinsert it. Jeetendra Ranjan MySQL DBA --- On Thu, 26/8/10, Kranthi wrote: From: Kranthi Subject: RE: Recover Records To: "'Jangita'" Cc: mysql@lists.mysql.com Date: Thursday, 26 August, 2010, 4:20 PM Thank u Janqita, I can get Regards , Kranthi -Original Message- From: Jangita [mailto:jang...@jangita.com] Sent: Thursday, August 26, 2010 3:33 PM To: mysql@lists.mysql.com Subject: Re: Recover Records On 26/08/2010 11:35 a, Kranthi wrote: > Hi all, > > My database size is 1gb.I take backup at 12 am and unfortunately > I deleted 8 records at 2 am . I checked 8 records in 12 am backup , that 8 > records are not there, I think that 8 records inserted between 12 am to 2 > am. I am maintaining log file how can I recover particular records. > Is it a binary log? if so use mysqlbinlog to search for the insert statements and re-insert them. -- Jangita | +256 76 91 8383 | Y! & MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=kranthi_penty...@iicindia.com -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=jitendra_ran...@yahoo.com
Re: master-slave replication sync problems.
Hi, The best way to use sync the master and slave is using mk-checksum tools. just google it and use the the tools for online sync of master and slave. Jeetendra Ranjan MySQL DBA --- On Thu, 26/8/10, Norman Khine wrote: From: Norman Khine Subject: master-slave replication sync problems. To: mysql@lists.mysql.com Date: Thursday, 26 August, 2010, 6:34 PM hello, i have a working master-slave replication, the problem i find is that if i restart the MASTER there is a difference in the MASTER_LOG_FILE and MASTER_LOG_POS on the SLAVE. what is the correct way to keep the two slaves in sync even after i restart the server. the way i do it now is to: [MASTER] mysql> show master status; +--+--+--+--+ | mysql-bin.10 | 13405429 | upgrade,tracker,bugs | mysql,information_schema | +--+--+--+--+ 1 row in set (0.00 sec) [SLAVE] mysql> stop slave; mysql> change master to MASTER_HOST='master.domain.com', MASTER_USER='replicator', MASTER_PASSWORD='xxx', MASTER_LOG_FILE='mysql-bin.10', MASTER_LOG_POS=13301215; mysql> start slave; is this correct or is there a better way to do this? thanks -- ˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ ǝq s,ʇǝן ʇǝʎ %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=jitendra_ran...@yahoo.com
Re: MySQL Server has gone away
The account has full permission on all the databases. --- On Fri, 20/8/10, Ananda Kumar wrote: From: Ananda Kumar Subject: Re: MySQL Server has gone away To: "jitendra ranjan" Cc: "Krishna Chandra Prajapati" , "Prabhat Kumar" , mysql@lists.mysql.com Date: Friday, 20 August, 2010, 1:13 PM R u trying to connect as user "owning" all the database. Looks like there is permission issue. Please make sure, the user ur logging in has all rights on all the database in mysql. regards anandkl On Thu, Aug 19, 2010 at 8:37 PM, jitendra ranjan wrote: > Here is few lines from log: > > 100703 22:12:48 mysqld ended > 100703 22:23:39 mysqld started > 100703 22:23:40 [Warning] option 'max_join_size': unsigned value > 18446744073709551615 adjusted to 4294967295 > 100703 22:23:40 [Warning] option 'max_join_size': unsigned value > 18446744073709551615 adjusted to 4294967295 > 100703 22:23:40 [Warning] option 'thread_cache_size': unsigned value > 33554432 adjusted to 16384 > 100703 22:23:41 InnoDB: Started; log sequence number 0 44054 > 100703 22:23:41 [Warning] Neither --relay-log nor --relay-log-index were > used; so replication may break when this MySQL server acts as a slave and > has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to > avoid this problem. > 100703 22:23:41 [ERROR] Failed to open the relay log > '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4) > 100703 22:23:41 [ERROR] Could not find target log during relay log > initialization > 100703 22:23:41 [ERROR] Failed to initialize the master info structure > 100703 22:23:41 [Note] /usr/libexec/mysqld: ready for connections. > Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source > distribution > 100710 22:28:32 [Note] /usr/libexec/mysqld: Normal shutdown > 100710 22:28:34 InnoDB: Starting shutdown... > 100710 22:28:36 InnoDB: Shutdown completed; log sequence number 0 44054 > 100710 22:28:36 [Note] /usr/libexec/mysqld: Shutdown complete > 100710 22:28:36 mysqld ended > 100711 01:42:09 mysqld started > 100711 1:42:10 [Warning] option 'max_join_size': unsigned value > 18446744073709551615 adjusted to 4294967295 > 100711 1:42:10 [Warning] option 'max_join_size': unsigned value > 18446744073709551615 adjusted to 4294967295 > 100711 1:42:10 [Warning] option 'thread_cache_size': unsigned value > 33554432 adjusted to 16384 > 100711 1:42:10 InnoDB: Started; log sequence number 0 44054 > 100711 1:42:11 [Warning] Neither --relay-log nor --relay-log-index were > used; so replication may break when this MySQL server acts as a slave and > has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to > avoid this problem. > 100711 1:42:11 [ERROR] Failed to open the relay log > '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4) > 100711 1:42:11 [ERROR] Could not find target log during relay log > initialization > 100711 1:42:11 [ERROR] Failed to initialize the master info structure > 100711 1:42:11 [Note] /usr/libexec/mysqld: ready for connections. > Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source > distribution > 100726 9:37:14 [Warning] Warning: Enabling keys got errno 137 on > reachout.#sql-d4d_23af19, retrying > 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file: > './reachout/tbl_customer_reachout_new.frm' (errno: 13) > 100813 19:04:51 [Note] /us
Re: MySQL Server has gone away
problem. 100813 19:07:47 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4) 100813 19:07:47 [ERROR] Could not find target log during relay log initialization 100813 19:07:47 [ERROR] Failed to initialize the master info structure 100813 19:07:47 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 100817 6:41:54 [Note] /usr/libexec/mysqld: Normal shutdown 100817 6:41:54 [Warning] Warning: Enabling keys got errno 137 on reachout.#sql-7b1f_5f43a, retrying 100817 6:41:56 InnoDB: Starting shutdown... 100817 6:41:58 InnoDB: Shutdown completed; log sequence number 0 44054 100817 6:41:58 [Note] /usr/libexec/mysqld: Shutdown complete 100817 06:41:58 mysqld ended 100817 06:42:09 mysqld started 100817 6:42:09 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 100817 6:42:09 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295 100817 6:42:09 [Warning] option 'thread_cache_size': unsigned value 33554432 adjusted to 16384 100817 6:42:10 InnoDB: Started; log sequence number 0 44054 100817 6:42:11 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this problem. 100817 6:42:11 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4) 100817 6:42:11 [ERROR] Could not find target log during relay log initialization 100817 6:42:11 [ERROR] Failed to initialize the master info structure 100817 6:42:11 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution --- On Thu, 19/8/10, Prabhat Kumar wrote: From: Prabhat Kumar Subject: Re: MySQL Server has gone away To: "Krishna Chandra Prajapati" Cc: "jitendra ranjan" , mysql@lists.mysql.com Date: Thursday, 19 August, 2010, 4:56 PM there is high chance of corruption of any data files, but it will clear only after looking of your error file (generated by mysql) can you post the 50 last lines of your mysql error file. On Thu, Aug 19, 2010 at 4:35 PM, Krishna Chandra Prajapati < prajapat...@gmail.com> wrote: > Hi Jitendra, > > Check your error log file. Some thing might have gone wrong. > > Krishna > > On Wed, Aug 18, 2010 at 9:41 PM, jitendra ranjan > wrote: > > > Hi, > > > > Whenever i run any commnd on mysql it gives message as below then gives > the > > result successfully. What is the reason of the below error message : > > > > ERROR 2006 (HY000): MySQL server has gone away > > No connection. Trying to reconnect... > > Connection id: 264550 > > Current database: *** NONE *** > > > > > > Thanks in advance > > > > > -- Best Regards, Prabhat Kumar MySQL DBA My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat
MySQL Server has gone away
Hi, Whenever i run any commnd on mysql it gives message as below then gives the result successfully. What is the reason of the below error message : ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 264550 Current database: *** NONE *** Thanks in advance
max_seeks_for_key
Hi, We have myisam tables which has round 10 lakhs of records in each tables.I want to search the records based on index. What should be the value of max_seeks_for_key as it is set at default 4294967295. Thanks in advance. Jeetendra Ranjan MySQL DBA
RE: opened_table status
As our file descriptor does not allow to increase the table_cache is there any other way to decrease the occurence of opened_table ? --- On Fri, 13/8/10, Gavin Towey wrote: From: Gavin Towey Subject: RE: opened_table status To: "jitendra ranjan" , "mysql@lists.mysql.com" Date: Friday, 13 August, 2010, 12:06 AM You don't need to flush tables, just increase the table_cache. -Original Message----- From: jitendra ranjan [mailto:jitendra_ran...@yahoo.com] Sent: Thursday, August 12, 2010 10:55 AM To: mysql@lists.mysql.com Subject: opened_table status Hi, I have opened_table status is too high but i don't want increase the value of table_cache and also dont want to flush table because it will reset the query cache. Now my question is how can i decrease the opened_table status ? Thanks in advance Jeetendra Ranjan MySQL DBA This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you are notified that reviewing, disseminating, disclosing, copying or distributing this e-mail is strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any loss or damage caused by viruses or errors or omissions in the contents of this message, which arise as a result of e-mail transmission. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA, FriendFinder.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=jitendra_ran...@yahoo.com
opened_table status
Hi, I have opened_table status is too high but i don't want increase the value of table_cache and also dont want to flush table because it will reset the query cache. Now my question is how can i decrease the opened_table status ? Thanks in advance Jeetendra Ranjan MySQL DBA