安装
其实之前已经安装过无数遍了。之前主要是从源代码编译安装。
通过yum安装
# wget https://repo.mysql.com//mysql80-community-release-el6-3.noarch.rpm
如果需要卸载之前安装的版本的话
# yum remove mysql80-community-release.noarch mysql-community-server.i686 mysql-community-libs.i686 mysql-community-devel.i686 mysql-community-common.i686 mysql-community-client.i686
安装mysql80-community-release.noarch
# rpm -Uvh mysql80-community-release-el6-3.noarch.rpm
执行之后可以看到:
# yum list installed
mysql80-community-release.noarch el6-3 installed
# ls /etc/yum.repos.d/mysql*
/etc/yum.repos.d/mysql-community.repo /etc/yum.repos.d/mysql-community-source.repo
# cat /etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.5 [mysql55-community] name=MySQL 5.5 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql # Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql # Enable to use MySQL 5.7 [mysql57-community] name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql80-community] name=MySQL 8.0 Community Server baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
默认只开启了最新版本:mysql80-community
[mysql-connectors-community] name=MySQL Connectors Community baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-community] name=MySQL Tools Community baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-preview] name=MySQL Tools Preview baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.5-community] name=MySQL Cluster 7.5 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-7.5-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.6-community] name=MySQL Cluster 7.6 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-7.6-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-8.0-community] name=MySQL Cluster 8.0 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-8.0-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
# cat /etc/yum.repos.d/mysql-community-source.repo
[mysql55-community-source] name=MySQL 5.5 Community Server - Source baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql56-community-source] name=MySQL 5.6 Community Server - Source baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql57-community-source] name=MySQL 5.7 Community Server - Source baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql80-community-source] name=MySQL 8.0 Community Server - Source baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-connectors-community-source] name=MySQL Connectors Community - Source baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-community-source] name=MySQL Tools Community - Source baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-preview-source] name=MySQL Tools Preview - Source baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.5-community-source] name=MySQL Cluster 7.5 Community - Source baseurl=http://repo.mysql.com/yum/mysql-cluster-7.5-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.6-community-source] name=MySQL Cluster 7.6 Community - Source baseurl=http://repo.mysql.com/yum/mysql-cluster-7.6-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-8.0-community-source] name=MySQL Cluster 8.0 Community - Source baseurl=http://repo.mysql.com/yum/mysql-cluster-8.0-community/el/6/SRPMS enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
默认安装最新版本
# yum install mysql-community-server
安装指定版本
这里开启mysql57-community
# yum-config-manager --disable mysql80-community
# yum-config-manager --enable mysql57-community
执行之后可以看到:
# cat /etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.5 [mysql55-community] name=MySQL 5.5 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql # Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql # Enable to use MySQL 5.7 [mysql57-community] name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql80-community] name=MySQL 8.0 Community Server baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-connectors-community] name=MySQL Connectors Community baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-community] name=MySQL Tools Community baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-tools-preview] name=MySQL Tools Preview baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.5-community] name=MySQL Cluster 7.5 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-7.5-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-7.6-community] name=MySQL Cluster 7.6 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-7.6-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql [mysql-cluster-8.0-community] name=MySQL Cluster 8.0 Community baseurl=http://repo.mysql.com/yum/mysql-cluster-8.0-community/el/6/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
安装mysql-community-server
# yum install mysql-community-server --installroot=/usr/local/mysql57
默认会安装mysql-connectors-community,mysql-tools-community。这从上面的配置可以看出。
安装mysql客户端
# yum install mysql-community-client
MySQL Connector/C, C API (libmysqlclient)
新版本在安装mysql-community-server后就已经安装了
# yum install mysql-community-devel
针对以前的版本
# yum install mysql-devel
Windows下mysql安装
Windows下mysql直接下载下来解压就可以了,不用安装。或者下载installer程序进行安装,不用编译。
mysql现在已经不支持xp了。
不清楚具体从什么版本开始不再支持xp了。前段时间在一台老笔记本上下载了个mysql-5.7.30-win32.zip,发现就不支持xp了。
当然也可以下载源代码编译安装。
相关推荐
mysql安装配置教程MySQL是一种流行的开源关系型数据库管理系统,它可以在多种操作系统上运行。下面是一个简单的MySQL安装配置教程: 下载MySQL安装包:首先,你需要从MySQL官方网站上下载适合你操作系统的MySQL...
预安装了数据库:mysql5.7.38 redis-7.0.0 mongodb5.0.8 安装路径: mysql:安装路径/usr/local/mysql,配置文件路径/etc/my.cnf redis:安装路径/usr/local/redis,配置文件redis.cnf路径/usr/local/redis/bin/ ...
Codeigniter安装Mysql数据库 安装或导入mysql数据库并运行codeigniter APP的基本示例 You can use it in all your projects ##要求: Codeigniter 3.0 Mysql:主机名+用户名+密码 Bootstrap 3(CDN) 在...
linux安装mysql,亲测没有问题,本文档详细介绍了linux下用命令行实现mysql的安装,小白即可使用
二、安装MySQL服务器端: 安装文件:MySQL-server-5.1.62-1.glibc23.i386.rpm # rpm -ivh /software/mysql/MySQL-server-5.1.62-1.glibc23.i386.rpm 这是在/usr/share/mysql 目录下生成一些 文件,其中有一个文件名...
二、安装MySQL服务器端: 安装文件:MySQL-server-5.1.62-1.glibc23.i386.rpm # rpm -ivh /software/mysql/MySQL-server-5.1.62-1.glibc23.i386.rpm 这是在/usr/share/mysql 目录下生成一些 文件,其中有一个文件名...
1 .bash_profile中path路径不正确,这里面的路径是你当前登录的用户去执行mysql的路径,你可以直接把这个path设置为mysql安装的位置,如:/usr/local/mysql-5.7.17-macos10.12-x86_64/bin。 2.第二个原因是可能在...
mysql安装图解 mysql图文安装教程(详细说明)
mysql源码安装mysql源码安装mysql源码安装mysql源码安装mysql源码安装
MySQL 版本号 高山: 3.7 MySQL的: mariaDB-10.1.28-r1 证书 默认 : MYSQL_ROOT_PASSWORD : root , MYSQL_DATABASE : app , MYSQL_USER : app , MYSQL_PASSWORD : app , MYSQL_USER_MONITORING : ...
mysql安装配置教程 MySQL是一种流行的开源关系型数据库管理系统(RDBMS),用于存储和检索数据。以下是MySQL的安装和配置的基本步骤。请注意,这里提供的步骤可能因操作系统和MySQL版本而异,因此请确保查阅相关...
原:安装版mysql 5.6安装问题.docx
percona_mysql 使用此角色在您的 debian 或 ubuntu 服务器上安装 percona-server。要求此角色需要 debian 或 ubuntu。角色变量默认变量集定义了 percona 安装,最多需要在 group_vars/host_vars 中覆盖 percona_...
打开MySQL安装目录,找到my.ini(Windows)或my.cnf(Linux)文件。 使用文本编辑器打开该文件。 在文件中找到[mysqld]部分,这是MySQL服务器的配置部分。 根据需要进行以下配置: 设置MySQL服务器的端口号:port = ...
二、安装Mysql 1、下载MySQL的安装文件 安装MySQL需要下面两个文件: MySQL-server-4.0.16-0.i386.rpm MySQL-client-4.0.16-0.i386.rpm 下载地址为:www.mysql.com/downloads/mysql-4.0.html,打开此...
为了操作的方便,建议先将mysql 的安装目录加入到path 环境变量中,如:将 c:\mysql\MySQL Server 5.0\bin 目录加入到path 中,以后不管当前目录是什么均可以执 行bin 目录下的命令。 1、启动Mysql 安装为服务:C:>...
MySQL学习笔记:MySQL安装,MySQL数据类型,MySQL事务,MySQL函数等学习笔记整理
安装和配置 MySQL 数据库服务器通常是相对简单的过程,下面是一般步骤: 1. 下载 MySQL 安装程序: 访问 MySQL 官方网站(https://www.mysql.com/)下载适用于你操作系统的 MySQL 安装程序。通常,你可以选择 MySQL...
mysql 数据库 安装包 32位安装包 ...Typical(典型安装)安装只安装MySQL服务器、mysql命令行客户端和命令行实用程序。命令行客户端和实用程序包括mysqldump、myisamchk和其它几个工具来帮助你管理MySQL服务器。