mysql5.5安装

闲着没事,装了下,记下来,蛋疼的赶脚,只是记下来而已,嗯....

tar -zxf mysql-5.5.28.tar.gz

cd mysql-5.5.28
groupadd mysql
useradd -r -g mysql mysql
mkdir /data
mkdir /data/mysql
chown mysql.mysql -R /data/mysql
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_DATADIR=/data/mysql/ \
-DMYSQL_TCP_PORT=3306
make && make install
cp /usr/local/mysql/upport-files/my-medium.cnf /etc/my.cnf
chmod 755 /usr/local/mysql/scripts/mysql_install_db
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld

你可能感兴趣的:(安装,mysql5.5)