Linux下软件环境安装(5)-mysql安装与配置(续)

https://dev.mysql.com/downloads/

MySQL Community Server 社区版本,开源免费
MySQL Cluster 集群版,开源免费
MySQL Router
MySQL Shell
MySQL Workbench 专为MySQL设计的ER/数据库建模工具

wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-server_8.0.20-2ubuntu20.04_amd64.deb-bundle.tar

mkdir mysql
cd mysql
tar xf ../mysql-server_8.0.22-1ubuntu20.04_amd64.deb-bundle.tar
sudo dpkg -i *

解决问题
Error mysql-community-server-core depends on libmecab2 (>= 0.996);
https://www.ubuntuupdates.org/package/core/xenial/universe/base/libmecab2
wget http://security.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_amd64.deb
sudo dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb

安装时选择5.x可以直接进
mysql -u root -p

CREATE USER 'user' IDENTIFIED BY '******';
create database userdb DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
grant all privileges on userdb.* to user@"%";

修改端口
vi /etc/mysql/mysql.conf.d/mysqld.cnf
末尾添加port=43306
sudo service mysql restart
sudo service mysql status

use mysql;
select host,user from user;
update user set host='%' where user='root';
flush privileges;

Navicat for MySQL 连接 Mysql 8.0.11 出现1251- Client does not support authentication protocol 错误
由于mysql 8.x登录验证方式改变,mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,

查看验证方式

select user,host,plugin,authentication_string from user;
alter user 'root'@'%' identified with mysql_native_password by 'bob.1234';

标签: none

添加新评论