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 inst
首頁 → 數據庫技術
背景:
閱讀新聞
CentOS5下MySQL源碼安裝方式
[日期:2011-04-03] 來源:Linux社區 作者:puwenhui [字體:]
1、編譯環境安裝
uname -a
Linux ha01 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux
yum -y install gcc
yum install -y gcc-c++
2、mysql編譯安裝
[root@ha01 local]# tar -xvf mysql-5.1..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.
[root@ha01 mysql-5.1.]# make
[root@ha01 mysql-5.1.]# make install
[root@ha01 mysql-5.1.]# cp support-files/my-medium.cnf /etc/my.cnf
[root@ha01 mysql-5.1.]# cp support-files/mysql.server /etc/init.d/mysql
[root@ha01 mysql-5.1.]# chmod +x /etc/init.d/mysql
[root@ha01 mysql-5.1.]# chkconfig --add mysql
[root@ha01 mysql-5.1.]# 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.-log Source distribution
Copyright (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 license
Type '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.]# /etc/init.d/mysql stop
Shutting down MySQL. [確定]
[root@ha01 mysql-5.1.]# /etc/init.d/mysql start
Starting MySQL. [確定]
Oracle數據庫DBA日常Sql列表
Oracle中SYS_CONNECT_BY_PATH函數的妙用
相關資訊 CentOS
圖片資訊
本文評論 查看全部評論 (0)
評論聲明
最新資訊
本周熱門
Linux公社簡介 - 廣告服務 - 網站地圖 - 幫助信息 - 聯系我們
本站(LinuxIDC)所刊載文章不代表同意其說法或描述,僅為提供更多信息,也不構成任何建議。
Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP備06018118號
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com