centos 6.9安装mysql的详细教程

1、确认mysql是否已安装,有下面的代码可知

[root@cdh1 zjl]# yum list installed mysql*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Installed Packages
MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 @base
mysql-libs.x86_64 5.1.73-8.el6_8  @anaconda-CentOS-201703281317.x86_64/6.9

2、卸载已安装的mysql,建议使用yum命令,因为yum命令可以自动删除与mysql相关的依赖;如果使用rpm命令,则还需要手动去删除和mysql相关的文件,比较麻烦

[root@cdh1 zjl]# yum remove MySQL-python.x86_64 mysql-libs.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased
--> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64
--> Running transaction check
---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased
---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-7.el6.centos.x86_64
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64
--> Running transaction check
---> Package cronie.x86_64 0:1.4.4-16.el6_8.2 will be erased
--> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2 will be erased
---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased
--> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64
---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased
---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased
--> Running transaction check
---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch 0:1.10-33.el6 will be erased
---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================
 Package    Arch Version     Repository
                Size
====================================================================
Removing:
 MySQL-python   x86_64 1.2.3-0.3.c1.1.el6  @base 246 k
 mysql-libs    x86_64 5.1.73-8.el6_8   @anaconda-CentOS-201703281317.x86_64/6.9
                4.0 M
Removing for dependencies:
 cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64
                71 M
 cronie     x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                174 k
 cronie-anacron   x86_64 1.4.4-16.el6_8.2   @anaconda-CentOS-201703281317.x86_64/6.9
                43 k
 crontabs    noarch 1.10-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                2.4 k
 postfix    x86_64 2:2.6.6-8.el6   @anaconda-CentOS-201703281317.x86_64/6.9
                9.7 M
 redhat-lsb    x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                0.0
 redhat-lsb-compat  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                0.0
 redhat-lsb-core  x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                22 k
 redhat-lsb-graphics x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                0.0
 redhat-lsb-printing x86_64 4.0-7.el6.centos   @anaconda-CentOS-201703281317.x86_64/6.9
                0.0
 sysstat    x86_64 9.0.4-33.el6    @anaconda-CentOS-201703281317.x86_64/6.9
                826 k
Transaction Summary
====================================================================
Remove  13 Package(s)
Installed size: 86 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
 Erasing : redhat-lsb-compat-4.0-7.el6.centos.x86_64  1/13
 Erasing : redhat-lsb-4.0-7.el6.centos.x86_64    2/13
 Erasing : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 3/13
warning: /etc/cloudera-scm-agent/config.ini saved as /etc/cloudera-scm-agent/config.ini.rpmsave
 Erasing : redhat-lsb-graphics-4.0-7.el6.centos.x86_64  4/13
 Erasing : redhat-lsb-printing-4.0-7.el6.centos.x86_64  5/13
 Erasing : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13
/var/tmp/rpm-tmp.jLbJUk: line 1: lsb_release: command not found
 Erasing : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   7/13
 Erasing : sysstat-9.0.4-33.el6.x86_64      8/13
 Erasing : crontabs-1.10-33.el6.noarch      9/13
 Erasing : cronie-anacron-1.4.4-16.el6_8.2.x86_64   10/13
 Erasing : cronie-1.4.4-16.el6_8.2.x86_64     11/13
 Erasing : 2:postfix-2.6.6-8.el6.x86_64     12/13
 Erasing : mysql-libs-5.1.73-8.el6_8.x86_64    13/13
 Verifying : redhat-lsb-printing-4.0-7.el6.centos.x86_64  1/13
 Verifying : cronie-anacron-1.4.4-16.el6_8.2.x86_64   2/13
 Verifying : cronie-1.4.4-16.el6_8.2.x86_64     3/13
 Verifying : 2:postfix-2.6.6-8.el6.x86_64     4/13
 Verifying : redhat-lsb-4.0-7.el6.centos.x86_64    5/13
 Verifying : redhat-lsb-core-4.0-7.el6.centos.x86_64   6/13
 Verifying : cloudera-manager-agent-5.11.1-1.cm5111.p0.9. 7/13
 Verifying : crontabs-1.10-33.el6.noarch      8/13
 Verifying : redhat-lsb-compat-4.0-7.el6.centos.x86_64  9/13
 Verifying : MySQL-python-1.2.3-0.3.c1.1.el6.x86_64   10/13
 Verifying : redhat-lsb-graphics-4.0-7.el6.centos.x86_64 11/13
 Verifying : sysstat-9.0.4-33.el6.x86_64     12/13
 Verifying : mysql-libs-5.1.73-8.el6_8.x86_64    13/13
Removed:
 MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6
 mysql-libs.x86_64 0:5.1.73-8.el6_8
Dependency Removed:
 cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6
 cronie.x86_64 0:1.4.4-16.el6_8.2
 cronie-anacron.x86_64 0:1.4.4-16.el6_8.2
 crontabs.noarch 0:1.10-33.el6
 postfix.x86_64 2:2.6.6-8.el6
 redhat-lsb.x86_64 0:4.0-7.el6.centos
 redhat-lsb-compat.x86_64 0:4.0-7.el6.centos
 redhat-lsb-core.x86_64 0:4.0-7.el6.centos
 redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos
 redhat-lsb-printing.x86_64 0:4.0-7.el6.centos
 sysstat.x86_64 0:9.0.4-33.el6
Complete!

3、用whereis命令查找mysql相关的文件,因为步骤2用yum来卸载,所以mysql被清理得很干净;如果使用rpm将会很麻烦,有很多的文件需要手动清除

[root@cdh1 zjl]# whereis mysql
mysql:

4、查看系统中的mysql安装包

[root@cdh1 zjl]# yum list mysql*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Available Packages
MySQL-python.x86_64                      1.2.3-0.3.c1.1.el6                    base
mysql.x86_64                        5.1.73-8.el6_8                     base
mysql-bench.x86_64                       5.1.73-8.el6_8                     base
mysql-connector-java.noarch                    1:5.1.17-6.el6                     base
mysql-connector-odbc.x86_64                    5.1.5r1144-7.el6                     base
mysql-devel.i686                       5.1.73-8.el6_8                     base
mysql-devel.x86_64                       5.1.73-8.el6_8                     base
mysql-embedded.i686                      5.1.73-8.el6_8                     base
mysql-embedded.x86_64                      5.1.73-8.el6_8                     base
mysql-embedded-devel.i686                     5.1.73-8.el6_8                     base
mysql-embedded-devel.x86_64                    5.1.73-8.el6_8                     base
mysql-libs.i686                       5.1.73-8.el6_8                     base
mysql-libs.x86_64                       5.1.73-8.el6_8                     base
mysql-server.x86_64                      5.1.73-8.el6_8                     base
mysql-test.x86_64                       5.1.73-8.el6_8                     base

5、选择mysql-server来安装

[root@cdh1 zjl]# yum install mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.73-8.el6_8 will be installed
--> Processing Dependency: mysql = 5.1.73-8.el6_8 for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-5.1.73-8.el6_8.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-8.el6_8 will be installed
---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================================================
 Package            Arch           Version            Repository         Size
=================================================================================================================================================================================================================
Installing:
 mysql-server           x86_64           5.1.73-8.el6_8           base           8.6 M
Installing for dependencies:
 mysql             x86_64           5.1.73-8.el6_8           base           895 k
 mysql-libs            x86_64           5.1.73-8.el6_8           base           1.2 M
 perl-DBD-MySQL           x86_64           4.013-3.el6           base           134 k
 perl-DBI            x86_64           1.609-4.el6           base           705 k
Transaction Summary
=================================================================================================================================================================================================================
Install  5 Package(s)
Total download size: 12 M
Installed size: 33 M
Is this ok [y/N]:

6、选择y继续安装

Is this ok [y/N]: y
Downloading Packages:
(1/5): mysql-5.1.73-8.el6_8.x86_64.rpm                                     | 895 kB  00:00
(2/5): mysql-libs-5.1.73-8.el6_8.x86_64.rpm                                    | 1.2 MB  00:00
(3/5): mysql-server-5.1.73-8.el6_8.x86_64.rpm                                    | 8.6 MB  00:02
(4/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                    | 134 kB  00:00
(5/5): perl-DBI-1.609-4.el6.x86_64.rpm                                     | 705 kB  00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                           2.2 MB/s | 12 MB  00:05
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : mysql-libs-5.1.73-8.el6_8.x86_64                                        1/5
 Installing : perl-DBI-1.609-4.el6.x86_64                                         2/5
 Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                        3/5
 Installing : mysql-5.1.73-8.el6_8.x86_64                                         4/5
 Installing : mysql-server-5.1.73-8.el6_8.x86_64                                       5/5
 Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64                                        1/5
 Verifying : mysql-libs-5.1.73-8.el6_8.x86_64                                        2/5
 Verifying : mysql-server-5.1.73-8.el6_8.x86_64                                       3/5
 Verifying : mysql-5.1.73-8.el6_8.x86_64                                         4/5
 Verifying : perl-DBI-1.609-4.el6.x86_64                                         5/5
Installed:
 mysql-server.x86_64 0:5.1.73-8.el6_8
Dependency Installed:
 mysql.x86_64 0:5.1.73-8.el6_8     mysql-libs.x86_64 0:5.1.73-8.el6_8     perl-DBD-MySQL.x86_64 0:4.013-3.el6     perl-DBI.x86_64 0:1.609-4.el6
Complete!

7、启动mysql服务

[root@cdh1 zjl]# service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h cdh1.zjl.com password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
               [ OK ]
Starting mysqld:           [ OK ]

8、连接一下试一下,直接mysql然后\q关闭连接

[root@cdh1 zjl]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye

9、设置mysql开机启动

[root@cdh1 zjl]# chkconfig mysqld on

10、开启3306端口,并保存

[root@cdh1 zjl]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
[root@cdh1 zjl]# /etc/rc.d/init.d/iptables save

11、连接mysql设置密码

[root@cdh1 zjl]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=password('123') where user='root';
Query OK, 3 rows affected (0.02 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> \q
Bye

12、重启mysql服务

[root@cdh1 zjl]# service mysqld restart
Stopping mysqld:           [ OK ]
Starting mysqld:           [ OK ]

以上所述是小编给大家介绍的centos 6.9安装mysql的详细教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对我们网站的支持!

(0)

相关推荐

  • centOs6.9服务器版本安装图解(包含java和mysql)

    首先新建一个空的系统盘(选择的是centOs64位版本) 点击图上的编辑虚拟机设置 依次选择centOs的镜像文件,然后点击确定.下面开启虚拟机 出现这个画面之后选择第一个选项 出现上述画面后,选择skip跳过就到了安装的正式界面 一路next直到下面的画面出现 然后选择是,忽略所有数据(这个不用担心数据的问题,因为一开始建的就是空白磁盘) 然后出现下面的画面 可以自由的改名字,然后再点下一步之前一定要点配置网络(否则会上不了网) 先选择System eth0这个,然后点编辑(或者双击Syste

  • CentOS6.9+Mysql5.7.18源码安装详细教程

    CentOS6.9+Mysql5.7.18源码安装,以下操作均在root用户下执行. 1.安装依赖工具 cmake make3.75+ gcc4.4.6+ Boost1.59.0 bison ncurses yum install -y cmake,make,gcc,gcc-c++,bison, ncurses,ncurses-devel cd /opt wget https://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_

  • Centos6.9安装Mysql5.7.18步骤记录

    安装顺序rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm mysql-community-libs-5.7.18-1.el7.x86_64.rpm(依赖于common) mysql-community-client-5.7.18-1.el7.x86_64.rpm(依赖于libs) mysql-community-server-5.7.18-1.el7.x86_64.rpm(依赖于common,client) mysql-communi

  • centos 6.9安装mysql的详细教程

    1.确认mysql是否已安装,有下面的代码可知 [root@cdh1 zjl]# yum list installed mysql* Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirrors.zju.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyu

  • linux下使用cmake编译安装mysql的详细教程

    一.安装cmake 1.解压cmake压缩包 [root@mysql tools]# tar -zvxf cmake-2.8.8.tar.gz [root@mysql tools]# ls cmake-2.8.8 cmake-2.8.8.tar.gz mysql-5.5.16.tar.gz scripts 2.解析 [root@mysql tools]# cd cmake-2.8.8 [root@mysql cmake-2.8.8]# ./configure ------------------

  • CentOs7.x安装Mysql的详细教程

    CentOS7的yum源中默认好像是没有MySQL的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个

  • 在 CentOS 7 中安装 MySQL 8 的教程详解

    准备 本文环境信息: 软件 版本 CentOS CentOS 7.4 MySQL 8.0.x 安装前先更新系统所有包 sudo yum update 安装 1. 添加 Yum 包 wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm # 或者 wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm sudo yum up

  • CentOS 8.4安装Docker的详细教程

    目录 前言: 系统要求: 安装环境: 卸载旧版本: yum到底是干什么的? 使用yum安装: 配置yum稳定镜像源: 安装 Docker CentOS8 额外设置 开启Docker服务: 启动 Docker 守护进程: 手动启动 在系统启动时自动启动 Docker基础命令: 测试 Docker 是否安装正确 Docker学习系列文章 参考文章: 前言: Docker 是一个用于开发.传送和运行应用程序的开放平台.Docker 使您能够将应用程序与基础设施分开,以便您可以快速交付软件.使用 Doc

  • CentOS 8 安装 MariaDB的详细教程

    MariaDB 数据库管理系统是 MySQL 的一个分支,主要由开源社区在维护,采用 GPL 授权许可.开发这个分支的原因之一是:甲骨文公司收购了 MySQL 后,有将 MySQL 闭源的潜在风险,因此社区采用分支的方式来避开这个风险.MariaDB完全兼容mysql,使用方法也是一样的. 系统环境: CentOS Linux release 8.1.1911 (Core) 1)安装 mariaDB 2)开启服务.安装完成后首先要把MariaDB服务开启,并设置为开机启动 systemctl s

  • Centos 6.5下安装MySQL 5.6教程

    1.下载Linux对应的RPM包 http://dev.mysql.com/downloads/mysql/5.6.html wget http://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-5.6.33-1.el6.x86_64.rpm-bundle.tar 2.解压tar包 tar -xvf MySQL-5.6.33-1.el6.x86_64.rpm-bundle.tar 3.安装MySQL rpm -ivh MySQL-server-5.6.33-1

  • 使用YUM在Linux(CentOS 7)下安装mysql 5.7.18的教程详解

    项目需要使用MySQL,由于以前都是在windows下傻瓜式安装,基本没有遇到什么问题,但是这次是在服务器上安装,由于到Linux上安装软件不熟悉,走了不少弯路,耽误了好多时间.总结下来,以免下次再走弯路. ****************************图片插入不成功,不知道是怎么回事********************************* 一.各种环境: linux版本:CentOS Linux release 7.2.1511 (core) mysql版本:communi

  • Windows(x86,64bit)升级MySQL 5.7.17免安装版的详细教程

    MySQL需要升级到5.5.3以上版本才支持Laravel 5.4默认的utf8mb64字符编码.因此就把MySQL升级了一下,期间还是遇到些小问题,记录一下以供参考. 升级准备 备份之前MySql目录下的data目录(数据库目录). MySql官网下载MySQL 5.7.17版本压缩包. 管理员身份运行命令行,输入net stop mysql命令,停止mysql服务. 输入sc delete mysql命令,删除mysql服务. 卸载当前版本MySQL. 开始升级 解压MySQL 5.7.17

  • 阿里云Centos 7.5安装Mysql的教程

    CentOS 7的yum源中貌似没有正常安装MySQL时的mysql-sever文件,需要去官网上下载. # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server 成功安装之后重启mysql服务 # service mysqld re

随机推荐