https://dev.mysql.com/downloads/file/?id=504808
wang@pc:/opt/sdb1/Downloads$ sudo tar -C /opt/mysql/ -xvf mysql-server_8.0.25-1ubuntu20.04_amd64.deb-bundle.tar
sudo dpkg -i mysql-common_8.0.25-1ubuntu20.04_amd64.deb
sudo dpkg -i mysql-community-client-plugins_8.0.25-1ubuntu20.04_amd64.deb
sudo dpkg -i mysql-community-client-core_8.0.25-1ubuntu20.04_amd64.deb
sudo dpkg -i mysql-community-client_8.0.25-1ubuntu20.04_amd64.deb
sudo apt install libmecab2
sudo apt install libaio1
sudo dpkg -i mysql-community-server-core_8.0.25-1ubuntu20.04_amd64.deb
sudo dpkg -i mysql-client_8.0.25-1ubuntu20.04_amd64.deb
sudo dpkg -i mysql-community-server_8.0.25-1ubuntu20.04_amd64.deb
systemctl status mysql
mysqladmin --version
mysql -u root -p 2020wu
# 修改监听端口:
wei@wei:/opt/sdb1/Downloads/mysql$ systemctl stop mysql
wei@wei:/opt/sdb1/Downloads/mysql$ vi /etc/mysql/
conf.d/ my.cnf my.cnf.fallback mysql.cnf mysql.conf.d/
wei@wei:/opt/sdb1/Downloads/mysql$ vi /etc/mysql/mysql.conf.d/mysqld.cnf
wei@wei:/opt/sdb1/Downloads/mysql$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
wei@wei:/opt/sdb1/Downloads/mysql$
wei@wei:/opt/sdb1/Downloads/mysql$ tail -10 /etc/mysql/mysql.conf.d/mysqld.cnf
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
port = 3307
wei@wei:/opt/sdb1/Downloads/mysql$ systemctl start mysql
wei@wei:/opt/sdb1/Downloads/mysql$ sudo netstat -lntp |grep mysql
sudo: netstat:找不到命令
wei@wei:/opt/sdb1/Downloads/mysql$ sudo apt install net-tools
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
net-tools 已经是最新版 (1.60+git20180626.aebd88e-1ubuntu1)。
下列软件包是自动安装的并且现在不需要了:
ca-certificates-java distro-info fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libc6-dev:i386
libcrypt-dev:i386 libfprint-2-tod1 libllvm10 libncurses-dev:i386 linux-libc-dev:i386 openjdk-13-jre-headless
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 31 个软件包未被升级。
wei@wei:/opt/sdb1/Downloads/mysql$ sudo netstat -lntp |grep mysql
tcp6 0 0 :::3307 :::* LISTEN 3275/mysqld
tcp6 0 0 :::33060 :::* LISTEN 3275/mysqld
wei@wei:/opt/sdb1/Downloads/mysql$
Ubuntu安装mysql
最新推荐文章于 2024-07-10 17:48:52 发布