mysql5.5.20 源代码安装!
INSTALL-SOURCE里面有步骤 # Preconfiguration setup shell> groupadd mysql shell> useradd -r -g mysql mysql # Beginning of source-build specific instructions shell> tar zxvf mysql-VERSION.tar.gz shell> cd mysql-VERSION shell> cmake . shell> make shell> make install # End of source-build specific instructions # Postinstallation setup shell> cd /usr/local/mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql data # Next command is optional shell> cp support-files/my-medium.cnf /etc/my.cnf shell> bin/mysqld_safe --user=mysql & # Next command is optional shell> cp support-files/mysql.server /etc/init.d/mysql.serverF.A.Q- cmake .可能会报错!
- - Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
- 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)
- 按照提示,remove掉CMakeCache.txt 然后 yum install ncurses-devel 这个包!接下来按照INSTALL-SOURCE的流程走!
- 另外启动的时候可能会有报错
- 120214 13:30:53 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
- /usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
- 120214 13:30:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
- 提示说要运行mysql_upgrade 创建mysql.plugin 表,
- 我的做法是这样的!
- ./scripts/mysql_install_db --user=mysql
- 初始化下数据库
- 然后启动就没问题了!