mysql-5.5.14安装笔记

 

由于新的mysql-5.5和以前版本相比,有了很多更新和改进,今天抽时间安装了一下新版的mysql。一下是安装笔记。

下载相关软件:

新版mysql:http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.14.tar.gz

cmake:http://www.cmake.org/cmake/resources/software.html

安装环境RHEL5.4

1、安装cmake

 

 
 
  1. #tar zxf cmake-2.8.5.tar.gz  
  2. #cd cmake-2.8.5  
  3. #./bootstrap  
  4. #make  
  5. #make install  

 

2、编译安装mysql-5.5.14

 

 
 
  1. useradd mysql  
  2. tar zxf mysql-5.5.14.tar.g  
  3. cd mysql-5.5.14  
  4. CFLAGS="-O3" CXX=gcc 
  5. CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" 
  6. cmake . -LH|more //CMake下查看MySQL的编译配置  
  7. cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DEXTRA_CHARSETS=all 
  8. make  
  9. make install  
  10. chown -R mysql:mysql /usr/local/mysql  
  11. cp support-files/my-medium.cnf /etc/my.cnf  
  12. cd /usr/local/mysql/  
  13. ./scripts/mysql_install_db --user=mysql 
  14. /usr/local/mysql/bin/mysqld_safe --user=mysql &  
  15. /usr/local/mysql/bin/mysql  
  16. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  17. Your MySQL connection id is 2  
  18. Server version: 5.5.14-log Source distribution  
  19.  
  20. Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.  
  21.  
  22. Oracle is a registered trademark of Oracle Corporation and/or its  
  23. affiliates. Other names may be trademarks of their respective  
  24. owners.  
  25.  
  26. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  27.  
  28. mysql> show databases;  
  29. +--------------------+  
  30. | Database           |  
  31. +--------------------+  
  32. | information_schema |  
  33. | mysql              |  
  34. | performance_schema |  
  35. | test               |  
  36. +--------------------+  
  37. 4 rows in set (0.01 sec  
  38.  
  39.  
  40.  
  41.   

参考文档:http://www.orczhou.com/index.php/2011/06/compile-and-install-mysql-5-5-from-source/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值