ubuntu 18.04 使用 tar包安装mysql5.7.35

下载mysql 安装包:

MySQL :: Download MySQL Community Server (Archived Versions)

选择ubuntu 18.04 x64位

 

下载链接如下:

https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-server_8.0.29-1ubuntu18.04_amd64.deb-bundle.tar

ubuntu 执行下载:

wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-server_8.0.29-1ubuntu18.04_amd64.deb-bundle.tar

解压,执行命令

tar -xvf mysql-server_8.0.29-1ubuntu18.04_amd64.deb-bundle.tar

执行如下命令:

$> sudo apt-get install libaio1
$> sudo dpkg-preconfigure mysql-community-server_*.deb

 上面命令如上图,输入密码

sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb
提示如下:
sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb
Selecting previously unselected package mysql-common.
(Reading database ... 67396 files and directories currently installed.)
Preparing to unpack mysql-common_5.7.35-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (5.7.35-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client.
Unpacking mysql-community-server (5.7.35-1ubuntu18.04) ...
dpkg-deb: error: 'mysql-server_5.7.35-1ubuntu18.04_amd64.deb' is not a Debian format archive
dpkg: error processing archive mysql-server_5.7.35-1ubuntu18.04_amd64.deb (--install):    pkg: error processing archive mysql-server_5.7.35-1ubuntu18.04_amd64.deb (--install):   
 dpkg-deb --control subprocess returned error exit status 2
Setting up mysql-common (5.7.35-1ubuntu18.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mysql-community-client (5.7.35-1ubuntu18.04) ...
Setting up mysql-client (5.7.35-1ubuntu18.04) ...
dpkg: dependency problems prevent configuration of mysql-community-server:
 mysql-community-server depends on libmecab2; however:
  Package libmecab2 is not installed.

dpkg: error processing package mysql-community-server (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.52) ...
Errors were encountered while processing:
 mysql-server_5.7.35-1ubuntu18.04_amd64.deb
 mysql-community-server

执行:

sudo apt-get -f install

安装之后:

配置文件的位置:

  • 全部的配置文件 (like my.cnf) 在 /etc/mysql 目录下

  • 全部的二进制,库,头文件( binaries, libraries, headers),等在 /usr/bin and /usr/sbin

  • 数据目录在 /var/lib/mysql 目录下

安装结束。

验证:

mysql -u root  -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.35 MySQL Community Server (GPL)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

参考:

MySQL :: MySQL Installation Guide :: 7.6 Installing MySQL on Linux Using Debian Packages from Oracle

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值