kali linux 上安装MySQL 8.0.16

下载地址
MySQL Community Server 8.0.16


Debian Linux
Debian Linux 9 (x86, 64-bit)

下载的所有deb包如下:
有用到的
mysql-client_8.0.16-2debian9_amd64.deb
mysql-common_8.0.16-2debian9_amd64.deb
mysql-community-client_8.0.16-2debian9_amd64.deb
mysql-community-client-core_8.0.16-2debian9_amd64.deb
mysql-community-server_8.0.16-2debian9_amd64.deb
mysql-community-server-core_8.0.16-2debian9_amd64.deb
mysql-server_8.0.16-2debian9_amd64.deb
没有用到的
libmysqlclient21_8.0.16-2debian9_amd64.deb
libmysqlclient-dev_8.0.16-2debian9_amd64.deb
mysql-server_8.0.16-2debian9_amd64.deb-bundle.tar

安装顺序如下,Let‘s go

root@root:/b# dpkg -l |grep mysql
ii mysql-apt-config 0.8.13-1 all Auto configuration for MySQL APT Repo.
ii mysql-common 8.0.16-2debian9 amd64 Common files shared between packages
root@root:/b# dpkg --purge mysql-common
(正在读取数据库 ... 系统当前共安装有 117398 个文件和目录。)
正在卸载 mysql-common (8.0.16-2debian9) ...
正在清除 mysql-common (8.0.16-2debian9) 的配置文件 ...
update-alternatives: 警告: 侯选项 /etc/mysql/my.cnf.fallback(链接组 my.cnf 的一部分)不存在;从候选项列表中移除。
update-alternatives: 警告: /etc/alternatives/my.cnf 正处于未决状态;将以最佳选项更新它。
root@root:/b# ^C
root@root:/b# dpkg --purge mysql-apt-config
(正在读取数据库 ... 系统当前共安装有 117385 个文件和目录。)
正在卸载 mysql-apt-config (0.8.13-1) ...
正在清除 mysql-apt-config (0.8.13-1) 的配置文件 ...
root@root:/b# ls
eclipse
eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz
gns3-server_2.1.21_xenial2_amd64.deb
jdk-8u211-linux-x64-demos.tar.gz
jre-8u211-linux-x64.tar.gz
lost+found
mariadb-server_5.5.36
MySQL
mysql-8.0.16-community
mysql-server_8.0.15-1debian9
MySQL.zip
'Packet Tracer 7.2.1 for Linux 64 bit.tar.gz'
redis-5.0.5
redis-5.0.5.tar.gz
sublime_text_3
sublime_text_3_build_3207_x32.tar.bz2
sublime_text_3_build_3207_x64.tar.bz2
uex
uex_18.00.0.66_amd64.deb
uex-18.00.0.66_amd64.tar.gz
uex-18.00.0.66_i386.tar.gz
VMware-Workstation-Full-15.1.0-13591040.x86_64.bundle
root@root:/b# cd mysql-8.0.16-community/
root@root:/b/mysql-8.0.16-community# dpkg -i mysql-common_8.0.16-2debian9_amd64.deb
正在选中未选择的软件包 mysql-common。
(正在读取数据库 ... 系统当前共安装有 117380 个文件和目录。)
正准备解包 mysql-common_8.0.16-2debian9_amd64.deb ...
正在解包 mysql-common (8.0.16-2debian9) ...
正在设置 mysql-common (8.0.16-2debian9) ...
update-alternatives: 使用 /etc/mysql/my.cnf.fallback 来在自动模式中提供 /etc/mysql/my.cnf (my.cnf)
root@root:/b/mysql-8.0.16-community# dpkg -l | grep mysql
ii mysql-common 8.0.16-2debian9 amd64 Common files shared between packages

root@root:/b/mysql-8.0.16-community# dpkg -i mysql-community-client-core_8.0.16-2debian9_amd64.deb
正在选中未选择的软件包 mysql-community-client-core。
(正在读取数据库 ... 系统当前共安装有 117616 个文件和目录。)
正准备解包 mysql-community-client-core_8.0.16-2debian9_amd64.deb ...
正在解包 mysql-community-client-core (8.0.16-2debian9) ...
正在设置 mysql-community-client-core (8.0.16-2debian9) ...
正在处理用于 man-db (2.8.3-2) 的触发器 ...
root@root:/b/mysql-8.0.16-community# dpkg -i mysql-community-client_8.0.16-2debian9_amd64.deb
(正在读取数据库 ... 系统当前共安装有 117628 个文件和目录。)
正准备解包 mysql-community-client_8.0.16-2debian9_amd64.deb ...
正在将 mysql-community-client (8.0.16-2debian9) 解包到 (8.0.16-2debian9) 上 ...
正在设置 mysql-community-client (8.0.16-2debian9) ...
正在处理用于 man-db (2.8.3-2) 的触发器 ...
root@root:/b/mysql-8.0.16-community# dpkg -i mysql-client_8.0.16-2debian9_amd64.deb
(正在读取数据库 ... 系统当前共安装有 117628 个文件和目录。)
正准备解包 mysql-client_8.0.16-2debian9_amd64.deb ...
正在将 mysql-client (8.0.16-2debian9) 解包到 (8.0.16-2debian9) 上 ...
正在设置 mysql-client (8.0.16-2debian9) ...
root@root:/b/mysql-8.0.16-community# dpkg -i mysql-community-server_8.0.16-2debian9_amd64.deb
(正在读取数据库 ... 系统当前共安装有 117628 个文件和目录。)
正准备解包 mysql-community-server_8.0.16-2debian9_amd64.deb ...
正在将 mysql-community-server (8.0.16-2debian9) 解包到 (8.0.16-2debian9) 上 ...
正在设置 mysql-community-server (8.0.16-2debian9) ...
update-alternatives: 使用 /etc/mysql/mysql.cnf 来在自动模式中提供 /etc/mysql/my.cnf (my.cnf)
mysql.service is a disabled or a static unit, not starting it.

root@root:/b/mysql-8.0.16-community# dpkg -i mysql-server_8.0.16-2debian9_amd64.deb
(正在读取数据库 ... 系统当前共安装有 117628 个文件和目录。)
正准备解包 mysql-server_8.0.16-2debian9_amd64.deb ...
正在将 mysql-server (8.0.16-2debian9) 解包到 (8.0.16-2debian9) 上 ...
正在设置 mysql-server (8.0.16-2debian9) ...
root@root:/b/mysql-8.0.16-community# service mysql start
root@root:/b/mysql-8.0.16-community# ps aux | grep mysql
mysql 3941 1.1 10.3 2048024 400088 ? Ssl 09:00 0:02 /usr/sbin/mysqld
root 4303 0.0 0.0 6236 872 pts/0 S+ 09:04 0:00 grep mysql
root@root:/b/mysql-8.0.16-community# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@root:/b/mysql-8.0.16-community# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.16 MySQL Community Server - GPL

Copyright (c) 2000, 2019, 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.01 sec)

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.16 |
+-----------+
1 row in set (0.00 sec)

mysql> exit
Bye

注意:安装过程中会提示输入数据库密码,请务必记住密码。

转载于:https://www.cnblogs.com/xhai/p/11219289.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值