Mysql Scalability(6)Mysql Trouble Shooting

Mysql Scalability(6)Mysql Trouble Shooting

Error Message
ERROR 2013 (HY000): Lost connection to MySQL server during query

Remove and reinstall the mysql again.
>sudo apt-get autoremove --purge mysql-server
>sudo apt-get remove mysql-server
>sudo apt-get autoremove mysql-server
>sudo apt-get remove mysql-common

>sudo apt-get install software-properties-common
>sudo add-apt-repository ppa:ondrej/mysql-5.6
>sudo apt-get update
>sudo apt-get install mysql-server

drop the database and create it again.

>drop database sillycat;
>create database sillycat;
>use sillycat;
>create table branduser(id int primary key, username char(255), age int);
>insert into branduser(id, username, age) values ( 1, "sillycat", 32);

Then configure them to be master/slave.

The master/slave stop after I restart the server. So we need to turn on the master/slave again.

References:
http://www.mysqlperformanceblog.com/2008/07/04/recovering-innodb-table-corruption/

相关推荐