发布于 2018-11-11 20:03:04
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
dpkg -i mysql-apt-config_0.8.10-1_all.deb
apt-get update
apt-get install mysql-server有图片:https://www.percona.com/blog/2018/05/14/installing-mysql-8-on-ubuntu-16-04-lts/
发布于 2018-11-11 20:50:17
确保您正在安装版本8。您可以下载它为这里,也可以通过终端下载:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb.导航到下载.deb包的位置,并在终端中运行以下命令:
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb你会得到一个配置提示..。只需选择"OK“。
由于存储库已经安装,请运行以下命令来安装:
sudo apt update
sudo apt install mysql-server mysql-clientMySQL的最新版本将安装在您的系统上。在安装过程中,应该提示您创建和确认MySQL根密码。

您可以确认是否要使用新的密码加密功能.这是“推荐”的。

遵循这些步骤之后,应该已经在您的系统中安装了MySQL!
您可以通过运行以下命令登录:
sudo mysql -u root -p这将带您进入MySQL欢迎屏幕,如:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, 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.https://askubuntu.com/questions/1092037
复制相似问题