在 Ubuntu 中安装 MySQL5.7.** 最新版

相关链接:

在 CentOS 1804 中 使用 yum 安装 MySQL 5.7 最新版

在不打开 3306 端口的情况下,使用 Navicat 进项远程连接(使用22端口)

在 CentOS 中 开启 MySQL 的 3306 端口

在 CentOS 1804 中 修改 MySQL 密码策略

在 CentOS 1804 中 安装 MySQL 5.7.20 (或任意MySQL版本)

在 Ubuntu 中安装 MySQL5.7.20(任意版本)


安装说明:

以下内容是依据官方文档(https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/)进项安装的。

适用范围:

  • Debian 7,8,9

  • Ubuntu 14.04,16.04,17.10,18.04


  1. 安装MySQL:
    root@csdn:~# apt-get install -y mysql-server
  2. 查看用户及随机密码等相关信息:
    root@csdn:~# cat /etc/mysql/debian.cnf
    # Automatically generated for Debian scripts. DO NOT TOUCH!
    [client]
    host     = localhost
    user     = debian-sys-maint
    password = y13FtH21wHrGJqAQ
    socket   = /var/run/mysqld/mysqld.sock
    [mysql_upgrade]
    host     = localhost
    user     = debian-sys-maint
    password = y13FtH21wHrGJqAQ
    socket   = /var/run/mysqld/mysqld.sock
    
  3. 登录MySQL:
    不要问我密码是什么,我是不会告诉你上面一部已经查到了。
    root@csdn:~# mysql -u debian-sys-maint -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 2
    Server version: 5.7.23-0ubuntu0.18.04.1 (Ubuntu)
    
    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.
    
    mysql> 
    

相关链接:

在 CentOS 1804 中 使用 yum 安装 MySQL 5.7 最新版

在不打开 3306 端口的情况下,使用 Navicat 进项远程连接(使用22端口)

在 CentOS 中 开启 MySQL 的 3306 端口

在 CentOS 1804 中 修改 MySQL 密码策略

在 CentOS 1804 中 安装 MySQL 5.7.20 (或任意MySQL版本)

在 Ubuntu 中安装 MySQL5.7.20(任意版本)

猜你喜欢

转载自blog.csdn.net/qq_32596527/article/details/82901779
今日推荐