时间:2021-07-01 10:21:17 帮助过:2人阅读
二、安装及配置
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm # rpm -ivh mysql-community-release-el6-5.noarch.rpm # yum install mysql-community-server -y
检查MySQL状态
service mysqld status
开启MySQL服务
service mysqld start
重启MySQL服务
# service mysqld restart
设置为开机启动
# chkconfig --list | grep mysqld
# chkconfig mysqld on
设置MySQL密码,第一次登陆不需要密码回车进入;设置本机MySQL密码及远程登录密码:
mysql> use mysql; mysql> update user set password=password(‘你设置的密码‘) where user=‘root‘ and host=‘localhost‘; mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘你设置的密码‘ WITH GRANT OPTION; mysql> flush privileges; mysql> quit
参考自:https://www.cnblogs.com/diandianxinghen/p/12942327.html
Centos 安装 mysql
标签:code chkconfig ant get 启动 nbsp move rem arc