一、mysql安裝配置
root@xmlinuxer-server:/media/WinF/LAMP#groupadd mysql
root@xmlinuxer-server:/media/WinF/LAMP#useradd -g mysql mysql
root@xmlinuxer-server:/media/WinF/LAMP#tar -zxvf mysql-5.0.33.tar.gz
root@xmlinuxer-server:/media/WinF/LAMP#cd mysql-5.0.33
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#./configure --prefix=/opt/app/mysql5 --without-debug --without-bench --with-charset=utf8 --with-extra-charsets=all --with-plugins=fthightman --enable-thread-safe-client
如果出現了以下錯誤:
checking for tgetent in -ltermcap... no
checking for termcap functions library… configure: error: No curses/termcap library found
說明 curses/termcap 庫沒有安裝
apt-cache search curses | grep lib
安裝 libncurses5-dev ,然後重新回合組態
apt-get install libncurses5-dev
或者方法二
去下載一個ncurses-5.6.tar.gz,
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure –prefix=/usr –with-shared –without-debug
make
make install clean
然後再重新編譯Mysql進行安裝。
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#make
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#make install
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#cp support-files/my-medium.cnf /etc/my.cnf //複製資料庫mysql的設定檔
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#cp support-files/mysql.server /etc/init.d/mysql
Ubuntu 系統下貌似沒有/etc/rc.d這目錄 嗯 其他的Linux系統可能是/etc/rc.d/init.d/mysql
root@xmlinuxer-server:/media/WinF/LAMP/mysql-5.0.33#cd /opt/app/mysql5
root@xmlinuxer-server:/opt/app/mysql5#bin/mysql_install_db --user=mysql
root@xmlinuxer-server:/opt/app/mysql5#chown -R root . //不要少了後面那個“.”咯
root@xmlinuxer-server:/opt/app/mysql5#chown -R mysql var
root@xmlinuxer-server:/opt/app/mysql5#chgrp -R mysql .
root@xmlinuxer-server:/opt/app/mysql5/share/mysql# service mysql start
程式 ’service’ 已包含在以下軟體包中:
* debian-helper-scripts
* sysvconfig
試試:apt-get install
bash: service:找不到命令
解決措施:安裝下這兩個軟體包就ok啦 #apt-get install sysvconfig debian-helper-scripts
root@xmlinuxer-server:/opt/app/mysql5#bin/mysqld_safe --user=mysql & 或者 service mysql start 啟動資料庫
root@xmlinuxer-server#/opt/app/mysql5/share/mysql/mysql.server stop 或者 service mysql stop 停止資料庫
本文來自CSDN部落格,轉載請標明出處:http://blog.csdn.net/qingxianyan/archive/2009/01/21/3849456.aspx