手工安装并配置mysql

完全删除MYSQL:

https://blog.csdn.net/you_tube/article/details/108959842

前期准备:

依赖包查询地址:https://pkgs.org/  (在搜索框中搜索所需要的deb包)

依赖包libmecab2:64位:http://archive.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_amd64.deb

依赖包libaio1:64位:http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-2_amd64.deb

mysql包:64位:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.25-1ubuntu16.04_amd64.deb-bundle.tar

安装mysql:

tar xvf mysql-server_5.7.25-1ubuntu16.04_amd64.deb-bundle.tar

所需的deb包

sudo dpkg -i libaio1_0.3.110-2_amd64.deb

libaio1 依赖包安装

sudo dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb

需要设置root用户的密码(建议大写字母+小写字母+特殊字符)

sudo dpkg-preconfigure mysql-community-server_*.deb

输入密码\再次输入密码

mysql基础包

sudo dpkg -i mysql-common_*.deb
sudo dpkg -i mysql-community-client_*.deb

mysql-community-client安装

sudo dpkg -i mysql-client_*.deb

mysql-clien 安装

sudo dpkg -i mysql-community-server_*.deb

mysql server安装

sudo dpkg -i mysql-community-server_*.deb

配置远程登录:

1> mysql -uroot –p{密码是前面设置的}

2> grant all privileges on *.* to 'root'@'%'identified by '密码' with grant option;

3> exit;

4> cd /etc/mysql/mysql.conf.d

5> sudo vi mysqld.cnf

注释bind-address = 127.0.0.1

配置文件

6> systemctl restart mysql.service

 

posted @ 2020-10-21 11:28  lenomail  阅读(124)  评论(0编辑  收藏  举报