mysql5.5.27安装步骤

mysql5.5.27安装与以往的mysql有些不同,如下:
 
1、下载cmake
 tar
 ./configure
 make && make install
 
2、groupadd mysql
 useradd -g mysql mysql
 mkdir -pv /usr/local/mysql/data
 
3、tar mysql
 cd
 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql - DMYSQL_DATADIR=/usr/local/mysql/data
 make && make install
 chown -R mysql:mysql /usr/local/mysql
 cp support-files/mysql.server /etc/init.d/mysqld
 chmod a+x /etc/init.d/mysqld
 chkconfig --add mysqld
 chkconfig --level 35 mysqld on
 cp support-files/my-medium.cnf /etc/my.cnf
 cd /usr/local/mysql
 scripts/mysql_install_db --user=mysql
 service mysqld start
 netstat -nltp | grep :3306

 /usr/local/mysql/bin/mysql -uroot -p 

你可能感兴趣的:(mysql5.5.27安装步骤)