Welcome 微信登录

首页 / 数据库 / MySQL / CentOS5下MySQL源码安装方式

1、编译环境安装 uname -aLinux ha01 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linuxyum -y install gccyum install -y gcc-c++2、mysql编译安装 [root@ha01 local]# tar -xvf mysql-5.1.54.tar.gz [root@ha01 local]# groupadd mysql
[root@ha01 local]# useradd -g mysql mysql
[root@ha01 local]# ./configure  --prefix=/usr/local/mysql  --with-named-curses-libs=/usr/lib/libncursesw.so.5[root@ha01 local]# cd mysql-5.1.54[root@ha01 mysql-5.1.54]# make[root@ha01 mysql-5.1.54]# make install
[root@ha01 mysql-5.1.54]# cp support-files/my-medium.cnf /etc/my.cnf
[root@ha01 mysql-5.1.54]# cp support-files/mysql.server /etc/init.d/mysql[root@ha01 mysql-5.1.54]# chmod +x /etc/init.d/mysql[root@ha01 mysql-5.1.54]# chkconfig --add mysql[root@ha01 mysql-5.1.54]# cd /usr/local/mysql[root@ha01 mysql]# bin/mysql_install_db --user=mysql[root@ha01 mysql]# chown -R root .[root@ha01 mysql]# chown -R mysql var
[root@ha01 mysql]# chgrp -R mysql .
[root@ha01 mysql]# bin/mysqld_safe --user/mysql &[root@ha01 mysql]# ./bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.54-log Source distributionCopyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 licenseType "help;" or "h" for help. Type "c" to clear the current input statement.mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.01 sec)3、启停服务 [root@ha01 mysql-5.1.54]# /etc/init.d/mysql stop
Shutting down MySQL.           [确定]
[root@ha01 mysql-5.1.54]# /etc/init.d/mysql start
Starting MySQL.                 [确定]Oracle数据库DBA日常Sql列表Oracle中SYS_CONNECT_BY_PATH函数的妙用相关资讯      CentOS 
  • CentOS虚拟机NAT静态IP设置  (07/04/2013 17:09:32)
  • CentOS 格式化新硬盘并设置开机自  (07/04/2013 16:50:50)
  • 服务器为何用CentOS不用Ubnutu  (02/24/2013 15:19:10)
  • CentOS /usr/libexec/gconf-sanity  (07/04/2013 17:07:42)
  • 为什么我们选择CentOS而不是Debian  (06/06/2013 06:19:40)
  • 在CentOS下搭建Android 开发环境  (02/18/2013 09:14:14)
本文评论 查看全部评论 (0)
表情: 姓名: 字数