mysql 错误_Mysql 错误以及解决办法

一: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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值