3个步骤实现在Ubuntu安装MySQL Server:
1.添加apt源
代码语言:javascript复制shell> sudo dpkg -i /PATH/version-specific-package-name.deb # 仓库文件下载地址:https://dev.mysql.com/downloads/repo/apt/
shell> sudo apt-get update
2.安装
代码语言:javascript复制shell> sudo apt-get install mysql-server
3.启动服务
代码语言:javascript复制shell> sudo service mysql status
shell> sudo service mysql stop
shell> sudo service mysql start
需要特别注意的是: 在安装过程中会提示设置root账户密码,一定要在这里设置好,否则安装完毕之后无法登录MySQL,切记切记!!!
【参考】 https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/ A Quick Guide to Using the MySQL APT Repository https://blog.csdn.net/lyhdream/article/details/40717467 Ubuntu下取消MySQL自动启动