官网下载LINUX编译版本 mysql-5.5.61-linux-glibc2.12-x86_64.tar.gz 解压
- shell> sudo apt-get install libaio-dev(或者libaio1)
- shell> sudo groupadd mysql
- shell> sudo useradd -r /nonexistent -s /bin/false -c mysql -g mysql mysql
- shell> sudo cd /usr/local
- shell> tar zxvf /home/niumd/mysql-5.5.13-linux2.6-i686.tar.gz
- shell> sudo mv /home/niumd/mysql-5.5.13-linux2.6-i686 /usr/local/mysql
- shell> cd /usr/local/mysql
- shell> sudo chown -R mysql:mysql .
- shell> sudo scripts/mysql_install_db –user=mysql
- shell> sudo chown -R mysql:mysql data
- shell> sudo cp support-files/mysql.server /etc/init.d/mysql.server
- shell> sudo cp support-files/my-medium.cnf /etc/mysql/my.cnf
- shell> sudo bin/mysqld_safe –user=mysql &
- shell> sudo pwd /usr/local/mysql
- shell> sudo bin/mysqladmin -u root password ‘new-password’
- shell> sudo bin/mysql -uroot -p