Linux下 MySQL安裝和基本管理 |
發(fā)布時間: 2012/7/10 17:41:12 |
•安裝linux一些必須的包: 1.yum install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* libevent •安裝mysql,mysql安裝包需要自己下載,安裝目錄 /usr/local/web/ 1.sudo mkdir -p /usr/local/web/ 2.sudo tar xzvf mysql-5.1.39.tar.gz 3.cd mysql-5.1.39 4../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 5.make 6.make install •創(chuàng)建mysql用戶組等信息 1.sudo groupadd mysql 2.sudo useradd -g mysql -s /sbin/nologin mysql 3.sudo ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/web/mysql.5.1.39/var 4.sudo chown -R root /usr/local/web/mysql.5.1.39 5.sudo chown -R mysql:mysql /usr/local/web/mysql.5.1.39/var •管理MYSQL 1.#啟動mysql: 2.sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server start 3.#重啟mysql 4.sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server restart 5.#停止mysql 6.sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server stop 本文出自:億恩科技【1tcdy.com】 服務(wù)器租用/服務(wù)器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |