执行完之后再去执行上面的就可以了:sudo ./mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --user=mysql
8>将mysql的配置文件和服务文件复制到系统配置路径下面
cp my-medium.config /etc/my.conf cp mysql.server /etc/init.d/mysqld
9>启动服务
service mysqld start || /etc/init.d/mysql start 添加到开机自启动( chkconfig --add mysqld)
10> 增加mysql的root用户的密码: mysql -u root password 'your_password
11>在进程中查看启动的情况 ps -ef | grep mysqld
从里面可以看出mysql为root用户启动,还可以看到安装目录以及端口号等。
12>链接到数据库:
好了,今天磕磕碰碰的总算是安上了,不过还有部分流程没有弄懂,比如权限问题、授权问题等,明天卸载再重装一下,如果有改动或者添加的地方再补充。'
还有可能在cmake . -DCMAKE_INSTALL_PREFIX=... 的时候出现这样的问题:
Could NOT find Curses (missing CURSES_LIBRARY CURSES_INCLUDE_PATH
解决方法:
[root@localhost software]# cd mysql-5.5.11
[root@localhost mysql-5.5.11]# cmake .
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:82 (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:126 (FIND_CURSES)
cmake/readline.cmake:216 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:250 (MYSQL_CHECK_READLINE)
-- Configuring incomplete, errors occurred!
[root@localhost mysql-5.5.11]# rm CMakeCache.txt
[root@localhost mysql-5.5.11]# yum install ncurses-devel
Warning: Bison executable not found in PATH
-- Configuring done
-- Generating done
-- Build files have been written to: /software/mysql-5.5.11
[root@localhost mysql-5.5.11]# yum install bison
按照提示来进行就可以了!!
照着做能成功,有几处有点问题:
1.第四步的cmake后面没有点,直接是空格
2.第七步在root下执行的命令是visudo
3.我觉得第七步应该在root用户下执行,否则找不到 mysql.plugin文件
总之,真的很感谢!
更多Mysql内容来自木庄网络博客
标签:Mysql
相关阅读 >>
更多相关阅读请进入《mysql》频道 >>

数据库系统概念 第6版
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。