kali linux 上安裝MySQL 8.0.16

<a href="https://dev.mysql.com/downloads/mysql" target="_blank">下載地址</a> <b> MySQL Community Server 8.0.16</b> <br /> <b> Debian Linux</b> <b> Debian Linux 9 (x86, 64-bit)</b>mysql

下載的全部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.tarlinux

安裝順序以下,Let‘s goredis

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 packagessql

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 - GPLeclipse

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.ui

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.this

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.orm

mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.01 sec)server

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

注意:安裝過程當中會提示輸入數據庫密碼,請務必記住密碼。

相關文章
相關標籤/搜索