一:Can
't open and lock privilege tables: Table '
mysql.host
' doesn'
t exist
13060612: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-devel
CMake 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