ubuntu server 12.04 安装 mysql5.7
2016-03-30 10:49
435 查看
再一次感受到,自己去摸索,没人带路,是件多么痛苦的事情,就因为这个简单的安装软件,我浪费了半个月,所以一定要分享一下。
因为原来用的mysql版本是5.5的,所以客户端发的表情无法保存,因为只有utf8mb4编码才可以保存,这个编码是utf8的扩展或超类吧,随你怎么想吧。只是mysql5.6以上的版本才支持utf8mb4这个编码,所以就要升级了。做为一个菜鸟,最常做的事就是百度跟google了,当然公司用的是VMware vShpere 了解这个鬼东西也用了好久。废话不多说了,试了n种方法以后,最后得到的结论就是官网上面最简单的方法。
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
下面就是原文,简单的翻译就是:
先下载这个配置文件:mysql-apt-config_0.6.0-1_all.deb 地址:http://dev.mysql.com/downloads/repo/apt/
再通过这个命令安装:
接下来就是:
sudo apt-get install mysql
(如果 你不更新上面的apt包,你直接安装的就是5.5的版本,我也是个菜鸟,没有把原来的那个系统升级,直接重新弄一个然后再把数据导过来,因为项目还没上线)
First, add the MySQL APT repository to your system's software repository list. Follow these steps:
Go to the download page for the MySQL APT repository at http://dev.mysql.com/downloads/repo/apt/.
Select and download the release package for your platform.
Install the downloaded release package with the following command, replacing
the name of the downloaded package (preceded by its path, if you are not running the command inside the folder where the package is):
[/code]
For example, for version
the package, the command is:
[/code]
Note that the same package works on all supported Debian and Ubuntu platforms.
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 Apply to
finish the configuration and installation of the release package.
You can always change your choices for the versions later; see Selecting
a Major Release Version for instructions.
Update package information from the MySQL APT repository with the following command (this
step is mandatory):
[/code]
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.
Note
Once the MySQL APT repository is enabled on your system, you will no longer be able to install any MySQL packages from your platform's native software repositories until the MySQL APT repository is disabled.
因为原来用的mysql版本是5.5的,所以客户端发的表情无法保存,因为只有utf8mb4编码才可以保存,这个编码是utf8的扩展或超类吧,随你怎么想吧。只是mysql5.6以上的版本才支持utf8mb4这个编码,所以就要升级了。做为一个菜鸟,最常做的事就是百度跟google了,当然公司用的是VMware vShpere 了解这个鬼东西也用了好久。废话不多说了,试了n种方法以后,最后得到的结论就是官网上面最简单的方法。
http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
下面就是原文,简单的翻译就是:
先下载这个配置文件:mysql-apt-config_0.6.0-1_all.deb 地址:http://dev.mysql.com/downloads/repo/apt/
再通过这个命令安装:
sudo dpkg -i /路径/version-specific-package-name
.deb[/code]
然后会弹出个对话框,然后先把你要安装的版本,我现在下载的这个是可以安装5.6或5.7的。选好版本以后选择 APPLY 选项,然后再ok.
接下来就是:shell> [code]sudo apt-get update[/code]
当你做完这步之后,你再执行安装mysql命令,你安装的就是你选择的版本了。就是这么简单。
sudo apt-get install mysql(如果 你不更新上面的apt包,你直接安装的就是5.5的版本,我也是个菜鸟,没有把原来的那个系统升级,直接重新弄一个然后再把数据导过来,因为项目还没上线)
Adding the MySQL APT Repository
First, add the MySQL APT repository to your system's software repository list. Follow these steps:Go to the download page for the MySQL APT repository at http://dev.mysql.com/downloads/repo/apt/.
Select and download the release package for your platform.
Install the downloaded release package with the following command, replacing
version-specific-package-namewith
the name of the downloaded package (preceded by its path, if you are not running the command inside the folder where the package is):
shell> [code]sudo dpkg -i /PATH/version-specific-package-name
.deb[/code]
For example, for version
w.x.y-zof
the package, the command is:
shell> [code]sudo dpkg -i mysql-apt-config_w.x.y-z
_all.deb[/code]
Note that the same package works on all supported Debian and Ubuntu platforms.
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 Apply to
finish the configuration and installation of the release package.
You can always change your choices for the versions later; see Selecting
a Major Release Version for instructions.
Update package information from the MySQL APT repository with the following command (this
step is mandatory):
shell> [code]sudo apt-get update
[/code]
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.
Note
Once the MySQL APT repository is enabled on your system, you will no longer be able to install any MySQL packages from your platform's native software repositories until the MySQL APT repository is disabled.
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- MySQL中的integer 数据类型
- MySQL存储过程
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件
- Ubuntu Linux使用体验
- MySQL创建用户及权限控制
- MySQL管理数据表
- linux下mysql添加用户
- mysql procedure
- mysql触发器
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹