1:
下载Mysql软件并解压:
-rwxrwxr-x. 1 root root 457441280 Jun 27
22:03 mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar
-rwxrwxr-x. 1 root root 23283472 May 26 00:59
mysql-community-client-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 334520 May 26 00:59
mysql-community-common-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 3715800 May 26 00:59
mysql-community-devel-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 38694928 May 26 00:59
mysql-community-embedded-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 134043920 May 26
01:00 mysql-community-embedded-devel-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 2174212 May 26 01:01 mysql-community-libs-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 1722880 May 26 01:01
mysql-community-libs-compat-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 149549092 May 26
01:01 mysql-community-server-5.7.13-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 103906648 May 26
01:02 mysql-community-test-5.7.13-1.el6.x86_64.rpm
2: 安装软件
安装:
yum localinstall *
3: Mysql数据库管理
2:启停Mysql
[root@Jason mysql]# service mysqld stop
Stopping mysqld:
[ OK ]
[root@Jason mysql]# service mysqld start
主要的配置文件my.cnf
3:修改root用户密码
3.1.停止当前mysql服务
service
mysqld stop
3. 2以--skip-grant-tables选项启动mysql
mysqld_safe
--user=mysql --skip-grant-tables --skip-networking &
3.1.3登陆
mysql -u root
mysql
3.3.修改登录密码:修改yourPassword处即可
5.7版本已经没有PASSWORD字段了改为了authentication_string
authentication_string=password('xxx')
authentication_string字段update user set authentication_string=password('123456') where user='root';
以前版本:
update user set password=password('123456') where user='root';
3.4:重启数据库
service
mysqld restart
3.5 :登陆
mysql
-uroot -p
密码123456