Mysql database simple installation (binary)
Binary installation: [root@lufengcentos ~] # mkdir / home/lufeng/tools-p [root@lufengcentos ~] # cd / home/lufeng/tools [root@lufengcentos tools] # rz [root@lufengcentos tools] # tar xf mysql-5.5.49-linux2.6-x86_64.tar.gz [root@lufengcentos tools] # mkdir-p / application/mysql-5.5.49 [root@lufengcentos tools] # mv mysql-5.5.49-linux2.6-x86_64 / application/mysql -5.5.49 create mysql users | Group [root@lufengcentos tools] # groupadd mysql [root@lufengcentos tools] # useradd mysql- g mysql- s / sbin/nologin-M initialization configuration file [root@lufengcentos tools] # ln-s / application/mysql-5.5.49/ / application/mysql [root@lufengcentos tools] # cd / application/mysql [root@lufengcentos mysql] # cp support-files/my-small.cnf / etc/my.cnf initialization database file [root] @ lufengcentos mysql] # mkdir-p / application/mysql/data [root@lufengcentos mysql] # chown-R mysql.mysql / application/mysql/ [root@lufengcentos mysql] # / application/mysql/scripts/mysql_install_db-- basedir=/application//mysql-- datadir=/application/mysql/data-- user=mysql configuration and launch MySQL [root @ lufengcentos mysql] # cp support-files/mysql.server / etc/init.d/mysqld [root@lufengcentos mysql] # chmod + x / etc/init.d/mysqldroot@lufengcentos Mysql] # sed-I's etc/init.d/mysqld root@lufengcentos mysql root@lufengcentos mysql # / etc/init.d/mysqld startStarting MySQL... SUCCESS! [root@lufengcentos mysql] # netstat-lntup | grep mysqltcp 0 0.0.0.0lntup 3306 0.0.0.0 LISTEN 2951/mysqld configure the global usage path [root@Mysql-server ~] # echo 'export PATH=/application/mysql/bin:$PATH' > > / etc/profile [root@Mysql-server ~] # tail-1 / etc/profileexport PATH=/application/mysql/bin : $path [root @ Mysql-server ~] # echo $PATH/application/mysql/bin:/applicaion/mysql/bin:/applicaion/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin Security configuration: [root@Mysql-server ~] # mysqladmin-u root password '199429' [root@Mysql-server ~] # mysqlERROR 1045 (28000): Access denied for user' root'@'localhost' (using password) : NO) [root@Mysql-server ~] # mysql-uroot-p Delete redundant users: +-+-+ | user | host | +-+-+ | root | 127.0.0.1 | | root | localhost | +-+-+