ubuntu mysql5.6_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-getupdate
sudo apt install mysql-server-5.6sudo apt install mysql-client-5.6
安裝mysql server的時候需要手動配置root密碼:
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 copythisto one of:
#- "/etc/mysql/my.cnf" to set globaloptions,
#- "~/.my.cnf" to set user-specific options.
#
# One can use alllongoptions that the program supports.
# Run program with--help to geta 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
# escpeciallyif they contain "#"chars...
# Remember to edit/etc/mysql/debian.cnf when changing the socket location.
# Hereis entries forsome 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
啟動/停止 Mysql
> sudo /etc/init.d/mysql start> sudo /etc/init.d/mysql stop
修改root密碼
sudo /usr/local/mysql/bin/mysqladmin -u root password abc
原文鏈接:https://blog.csdn.net/qq_36641556/article/details/80921737
總結
以上是生活随笔為你收集整理的ubuntu mysql5.6_ubuntu安装mysql5.6的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: pom 导入mysql连接,maven项
- 下一篇: python方法定义..._解析Pyth