当前位置:   article > 正文

Ubuntu 离线安装Mysql_ubuntu离线安装mysql

ubuntu离线安装mysql

一、安装包

下载Mysql安装包 下载地址:MySQL :: Download MySQL Community Server

二、安装Mysql

2.1解压安装包

        创建目录

mkdir  mysql

        解压到创建的目录下

tar -xvf mysql-server_8.0.29-1ubuntu21.10_amd64.deb-bundle.tar -C /home/mysql/

2.2增加执行权限

chmod +x *.deb

2.3安装

 安装依赖包

sudo dpkg -i libaio1_0.3.112-9_amd64.deb

 按顺序安装mysql

sudo dpkg -i mysql-common_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i libssl1.1_1.1.1l-1ubuntu1_amd64.deb

sudo dpkg -i mysql-community-client-plugins_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i mysql-community-client-core_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i libmysqlclient21_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i libmysqlclient-dev_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i libmecab2_0.996-14+b4_amd64.deb

sudo dpkg -i mysql-community-server-core_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i mysql-community-client_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i mysql-client_8.0.29-1ubuntu21.10_amd64.deb

sudo dpkg -i mysql-community-server_8.0.29-1ubuntu21.10_amd64.deb

弹出root密码输入框:

sudo dpkg -i mysql-community-server_8.0.29-1ubuntu21.10_amd64.deb

2.4 执行数据库脚本(可选项,导入业务初始化数据)

2.4.1 登录

sudo mysql –uroot –p

2.4.2 创建数据库

create database erp;

2.4.3 使用创建的数据库

use erp;

2.4.4 执行sql脚本文件

source /home/orm/mysql.sql;

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/555948
推荐阅读
相关标签
  

闽ICP备14008679号