Linux下MYSQL安裝和基本管理 安裝linux一些必須的包: [plain] yum install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* libevent 安裝mysql,mysql安裝包需要自己下載,安裝目錄 /usr/local/web/ [plain] sudo mkdir -p /usr/local/web/ sudo tar xzvf mysql-5.1.39.tar.gz cd mysql-5.1.39 www.2cto.com ./configure --prefix=/usr/local/web/mysql.5.1.39 --enable-thread-safe-client --enable-assembler --with-big-tables --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=complex make make install 創建mysql用戶組等信息 [plain] sudo groupadd mysql sudo useradd -g mysql -s /sbin/nologin mysql sudo ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/web/mysql.5.1.39/var www.2cto.com sudo chown -R root /usr/local/web/mysql.5.1.39 sudo chown -R mysql:mysql /usr/local/web/mysql.5.1.39/var 管理MYSQL [plain] #啟動mysql: sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server start #重啟mysql sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server restart #停止mysql sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server stop 作者 initphp