The MySQL SLES repository supports SLES 12 (for MySQL 5.6 and later) and SLES 11 (from 11.3 onward, for MySQL 5.5 and later), and only for the x86-64 architecture.
zypper repos | grep mysql.*community
禁用指定版本:
sudo zypper modifyrepo -d mysql57-community
启用指定版本:
zypper modifyrepo -e mysql56-community
查看所有启用版本
zypper repos -E | grep mysql.*community
刷新:
zypper refresh
mysql> update user set host ='%' where user = 'root';
mysql>flush privileges;
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql>FLUSH PRIVILEGES; #刷新权限
- 下载repository
- 安装repository
- Importing MySQL GnuPG Key
- 选择需要安装的版本
zypper repos | grep mysql.*community
禁用指定版本:
sudo zypper modifyrepo -d mysql57-community
启用指定版本:
zypper modifyrepo -e mysql56-community
查看所有启用版本
zypper repos -E | grep mysql.*community
刷新:
zypper refresh
- 安装mysql
- 启动mysql
- 修改root默认密码
- 远程登录授权 1130错误
mysql> update user set host ='%' where user = 'root';
mysql>flush privileges;
- 客户端加密算法不匹配错误 1251错误
出现这个原因是mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是
caching_sha2_password.解决问题方法有两种,一种是升级navicat驱动,一种是把mysql用户登录密码加密规则还原成
mysql_native_password.
第二种方式 :mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql>FLUSH PRIVILEGES; #刷新权限