时间:2021-07-01 10:21:17 帮助过:3人阅读
cp support-files/mysql.server /etc/init.d/mysqld
vi /etc/init.d/mysqld
basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64
datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data
初始化mysql
./scripts/mysql_install_db --use=mysql --basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64
--datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data
--defaults-file=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/my.cnf
加入开机自启动项
chkconfig --add mysqld
chkconfig --list mysqld
启动mysql 服务
service mysqld start
查看是否启动成功
netstat -anp|grep mysqld
进入mysql
./bin/mysql -u root
/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin -u root password ‘new-password‘
/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin -u root -h skinglzw password ‘new-password‘
centos 安装mysql 5.6 二进制包安装
标签:mysql