本文共 864 字,大约阅读时间需要 2 分钟。
二进制方式快速安装MySQL数据库命令集合,纯干货,无废话。
1.安装mysqlls mysql-5.5.32-linux2.6-x86_64.tar.gz tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz mv mysql-5.5.32-linux2.6-x86_64 /application/mysql-5.5.32ln -s /application/mysql-5.5.32 /application/mysql ##########相当于编译步骤的make install完成#############2.创建用户和目录useradd mysql -s /sbin/nologin -Mchown -R mysql.mysql /application/mysql/data/3.初始化数据库cd /application/mysql./scripts/mysql_install_db --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data/\cp support-files/my-small.cnf /etc/my.cnfcp support-files/mysql.server /etc/init.d/mysqldchmod +x /etc/init.d/mysqld sed -i 's#/usr/local/mysql#/application/mysql#g' /application/mysql/bin/mysqld_safe /etc/init.d/mysqld/etc/init.d/mysqld startnetstat -lntup|grep mysqlcp -a /application/mysql/bin/* /usr/local/sbin/mysqladmin password oldboy123mysql -uroot -poldboy123
转载地址:http://xrgpo.baihongyu.com/