Skip to main content

Posts

Showing posts from February, 2014

MySQL Creating a SSH tunnel using PuTTY

Prerequisites: • MySQL is installed. • MySQL is configured to listen on localhost (127.0.0.1). This is enabled by default. How to Access MySQL Remotely by Creating an SSH Tunnel with PuTTYPermalink This section will show you how to create an SSH tunnel to MySQL on Windows, using the PuTTY tool. Setting Up the Tunnel First, you need to establish a basic connection to your node: 1. Download PuTTY. 2. Save PuTTY to your desktop. 3. Double-click the PuTTY file to begin - no need to install. You will see the following window: 1. Enter the hostname or IP address of your Linode in the Host Name (or IP address) field. 2. In the left-hand menu, go to Connection -> SSH -> Tunnels. 3. In the Source port field, enter 3306. 4. In the Destination field, enter 127.0.0.1:3306. See the final configuration below: 1. Click Open to start the SSH session. 2. If you haven’t logged in to this system with PuTTY before, you will receive a warning simila...

MySQL thread error code of 1032- Translate binlog completely to avoid error

Could not execute Update_rows event on table db.table; Can't find record in 'table', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's   master log mysql-bin.262297, end_log_pos 1983208 As of my knowledge the causing stop of slave SQL thread error code of 1032, due to lack of sync between Master - Slave. In our case, slave got an Update event form master, but that particular record was not available in the slave. (Of course, that was deleted on Master n Slave separately) You would get this error only if the binlog_format is set to ROW_BASED or MIXED mode. So, now check that particular binlog at that position where replication stopped with this error. When you convert the binlog with mysqlbinlog command, you may see some junk characters   where you were expecting some DMLs which caused the error(In our case its an Update statement). So you can use below command to translate binlog completely: mysqlbinlog --base64-output=DECO...