[linux上路] 开发环境准备二 Debian8 通过APT Repository资源安装Mysql
2017-05-05 09:43
337 查看
A Quick Guide to Using the MySQL APT Repository
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-install-components
第二步:During the installation of the package, you will be asked to choose the versions of the MySQL server and other components (for example, the MySQL Workbench) that you want to install. If you are not sure which version to choose, do not change the default options selected for you. You can also choose none if you do not want a particular component to be installed. After making the choices for all components, choose Ok to finish the configuration and installation of the release package.
安装过程中,会问你选择Mysql的版本和想安装的其他组件,如果你不确定选择哪个版本就不要修改默认选项,选择OK结束设置并开始安装。
第三步:Update package information from the MySQL APT repository with the following command (this step is mandatory):如果要更新软件包,执行
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-repo-manual-setup
1.Download the MySQL GPG Public key (see Signature Checking Using GnuPG on how to do that) and save it to a file, without adding any spaces or special characters. Then, add the key to your system’s GPG keyring with the following command:下载Mysql GPG Public key并安装。
2.Alternatively, you can download the GPG key to your APT keyring directly using the apt-key utility:另外,也可以用apt-key utility直接下载到APT keyring(这个翻译叫密钥串)
3.Create a file named /etc/apt/sources.list.d/mysql.list, and put into it repository entries in the following format:创建一个文件,路径/etc/apt/sources.list.d/,文件名mysql.list把这句加到文件里
4.Use the following command to get the most up-to-date package information from the MySQL APT repository:
This installs the package for the MySQL server, as well as the packages for the client and for the database common files.
第二步:During the installation, there are two requests by the dialogue boxes:
(1)Supply a password for the root user for your MySQL installation.问root密码
(2)Indicate if you want to install the test database with “Yes” or “No.” Installation of the test database is not recommended for production environments.问是否安装test数据库
Stop the MySQL server with the following command:停止服务
To restart the MySQL server, use the following command:启动服务
至此,基本的安装就完成了,输入下面的命令查看是否安装成功
显示:
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-install-components
Adding the MySQL APT Repository添加APT Repository资源地址.
第一步:Download MySQL APT Repository下载资源地址安装包 mysql-apt-config_0.8.5-1_all.debshell> sudo dpkg -i mysql-apt-config_w.x.y-z_all.deb
第二步:During the installation of the package, you will be asked to choose the versions of the MySQL server and other components (for example, the MySQL Workbench) that you want to install. If you are not sure which version to choose, do not change the default options selected for you. You can also choose none if you do not want a particular component to be installed. After making the choices for all components, choose Ok to finish the configuration and installation of the release package.
安装过程中,会问你选择Mysql的版本和想安装的其他组件,如果你不确定选择哪个版本就不要修改默认选项,选择OK结束设置并开始安装。
第三步:Update package information from the MySQL APT repository with the following command (this step is mandatory):如果要更新软件包,执行
shell> sudo apt-get update
Adding and Configuring the MySQL APT Repository Manually
Instead of using the release package, you can also add and configure the MySQL APT repository manually; see Appendix A: Adding and Configuring the MySQL APT Repository Manually for details.可以手动设置APT repository,我就是手动设置的,用deb包安装资源的方式我没有成功。https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-repo-manual-setup
1.Download the MySQL GPG Public key (see Signature Checking Using GnuPG on how to do that) and save it to a file, without adding any spaces or special characters. Then, add the key to your system’s GPG keyring with the following command:下载Mysql GPG Public key并安装。
shell> sudo apt-key add path/to/signature-file
2.Alternatively, you can download the GPG key to your APT keyring directly using the apt-key utility:另外,也可以用apt-key utility直接下载到APT keyring(这个翻译叫密钥串)
shell> sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5
3.Create a file named /etc/apt/sources.list.d/mysql.list, and put into it repository entries in the following format:创建一个文件,路径/etc/apt/sources.list.d/,文件名mysql.list把这句加到文件里
deb http://repo.mysql.com/apt/{debian|ubuntu}/ {jessie|wheezy|trusty|utopic|vivid} {mysql-5.6|mysql-5.7|workbench-6.2|utilities-1.4|connector-python-2.0}
4.Use the following command to get the most up-to-date package information from the MySQL APT repository:
shell> sudo apt-get update
Installing MySQL with APT
第一步:Install MySQL by the following command:shell> sudo apt-get install mysql-server
This installs the package for the MySQL server, as well as the packages for the client and for the database common files.
第二步:During the installation, there are two requests by the dialogue boxes:
(1)Supply a password for the root user for your MySQL installation.问root密码
(2)Indicate if you want to install the test database with “Yes” or “No.” Installation of the test database is not recommended for production environments.问是否安装test数据库
Starting and Stopping the MySQL Server
The MySQL server is started automatically after installation. You can check the status of the MySQL server with the following command:安装完毕后Mysql服务会自动启动,你可以检查服务状态shell> sudo service mysql status
Stop the MySQL server with the following command:停止服务
shell> sudo service mysql stop
To restart the MySQL server, use the following command:启动服务
shell> sudo service mysql start
至此,基本的安装就完成了,输入下面的命令查看是否安装成功
shell> sudo mysql -u root -p
显示:
clementine@debian:~$ sudo mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.18 MySQL Community Server (GPL) Copyright (c) 2000, 2017, 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>
相关文章推荐
- [linux上路] 开发环境准备五 Debian8 中文输入法安装
- [linux上路] 开发环境准备三 Debian8 修改MySQL5.7字符集编码为UTF8
- [linux上路] 开发环境准备一 Debian8 jdk 配置
- [linux上路] 开发环境准备四 Debian8 导入CA证书
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(一搭建开发环境——安装交叉工具连)
- 在Linux上编译安装php开发环境(install mysql5.6)-3
- mysql linux c开发 新手指南 安装环境
- Linux开发环境搭建与使用——通过虚拟机安装系统( ubuntu )
- windows开发 linux部署 java [debian+resin+mysql+java] 之环境搭建
- Linux环境配置(三)——通过.rpm安装MySQL
- Linux 环境下安装 Nginx+php+mysql 开发环境
- Linux开发环境搭建之MySQL安装配置
- linux 下安装 mysql 并配置 python 开发环境
- Centos7.4 安装java开发环境(lnmt)Linux + Nginx+ MySQL+ Tomcat
- (转帖)Linux下面PHP开发环境源码安装-php,mysql,apache以及图形支持库GD的安装
- 开发环境准备-Mysql安装失败(5.6.39版本)
- [Ruby on Rails系列]1、开发环境准备:Vmware和Linux的安装
- [Linux]在Linux上部署Java开发环境笔记(五):Linux中安装MySQL
- windows开发 linux部署 java [debian+resin+mysql+java] 之环境搭建