ubuntu安装mysql5.6

安装mysql5.6

在ubuntu上安装mysql5.6的版本

1.添加mysql5.6的源
sudo apt-get install software-properties-common
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
2.安装mysql5.6
sudo apt-get update
sudo apt install mysql-server-5.6
sudo apt install mysql-client-5.6
3.设置开机自启
update-rc.d mysql defaults
4.创建或修改 my.cnf 文件

/etc/mysql/目录下添加 my.cnf文件

sudo vim /etc/mysql/my.cnf

复制下面的内容,并保存文件

# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

!includedir /etc/mysql/conf.d/
# add here
[mysqld]
default-time_zone = '+8:00'
lower_case_table_names=1
5.重启Mysql服务
sudo service mysql restart
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值