当前位置:Gxlcms > 数据库问题 > Centos 安装 mysql

Centos 安装 mysql

时间:2021-07-01 10:21:17 帮助过:2人阅读

-libs.x86_64 5.1.73-5.el6_6 @anaconda-CentOS-201508042137.x86_64/6.7


// 卸载某一个 #yum -y remove mysql-libs.x86_64
二、安装及配置
# 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   

人气教程排行