centos6.8 yum安装mysql 5.6
一、检查系统是否安装其他版本的MYSQL数据 yum list installed | grep mysql 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 repolist all | grep mysql 1、安装MYSQL数据库 yum install mysql-community-server -y 2、设置为开机启动 chkconfig --list | grep mysqld chkconfig mysqld on 3、设置密码 /usr/bin/mysqladmin -u root password '123456' 4、修改root密码 mysql -uroot -p123456 mysql> select Host,User,Password from user where User='root'; +-----------------------+------+-------------------------------------------+ | Host | User | Password | +-----------------------+------+-------------------------------------------+ | localhost | root | *4A82FDF1D80BA7470BA2E17FEEFD5A53D5D3B762 | | localhost.localdomain | root | | | 127.0.0.1 | root | | | ::1 | root | | +-----------------------+------+-------------------------------------------+ 4 rows in set (0.00 sec) mysql> update user set Password = password('123456') where User='root'; Query OK, 4 rows affected (0.03 sec) Rows matched: 4 Changed: 4 Warnings: 0 mysql> select Host,User,Password from user where User='root'; +-----------------------+------+-------------------------------------------+ | Host | User | Password | +-----------------------+------+-------------------------------------------+ | localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | localhost.localdomain | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | 127.0.0.1 | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | ::1 | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | +-----------------------+------+-------------------------------------------+ 4 rows in set (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
最新内容
- Linux系统下systemctl常用命令以及service文件配置
- CI PHP7 session 不能读取的问题
- centos 7.4 基本配置
- mysqldump导入导出数据库总结
- Linux下的tar压缩解压缩常用命令
- 查看 SELinux状态、临时关闭SELinux、永久关闭SELinux
- centos6.8 yum安装mysql 5.6
- CentOS之7与6的区别2
- CentOS之7与6的区别1
- Mysql 忘记root密码的完美解决方法
- 输入密码登录,Linux scp (rsync)设置nohup后台运行
- ubantu zabbix部署——安装配置zabbix agent详解
- Zabbix客户端(agent端口)安装配置
- CentOS 7添加开机启动服务/脚本
- 阿里云机器配置 centos 6.8