一:Can't open and lock privilege tables: Table 'mysql.host' doesn't exist13060612:34:51InnoDB: Waiting forthe background threads to start
13060612:34:52InnoDB: 5.5.31started; log sequence number 1595675
13060612:34:52[Note] Recovering after a crash using mysql-bin
13060612:34:52[Note] Starting crash recovery...
13060612:34:52[Note] Crash recovery finished.
13060612:34:52[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
解决办法:
在运行初始化权限表的时候使用增加参数--datadir ,命令格式为:[root@lvs-02 mysql5]# ./scripts/mysql_install_db --user=mysql --datadir=/opt/mysql5/
二:mysql error 1236 主主同步错误Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
解决办法:停止slave;然后在另一台master 执行flush logs; 再show master status;再 change master to 执行一次 ,start slave 就可以了
三:Mysql 5.5.X cmake问题[root@slave mysql-5.5.31]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5/
-- Running cmake version 2.6.4
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.5.31/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/root/mysql-5.5.31/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
解决办法:(用google搜索了下,大概都说有的没有安装gcc or g++,我确认安装以后)[root@slave cmake]# yum install make
四:mysql 5.5 缺少ncurses-develCMake Error at cmake/readline.cmake:83 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:127 (FIND_CURSES)
cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:269 (MYSQL_CHECK_READLINE)
-- Configuring incomplete, errors occurred!
解决办法:[root@slave mysql-5.5.31]# yum install ncurses-devel
安装完以后 要删除cmake 缓存 再编译
[root@slave mysql-5.5.31]# rm -rf CMakeCache.txt