linux系统(基于Ubuntu 18.04.4 LTS系统版本腾讯云资源)

1.安装

  执行apt-get install mysql-server

2.查看版本为5.7.30-0ubuntu0.18.04.1

3.设置权限并修改密码

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码';

update user set authentication_string=PASSWORD('root123'),plugin='mysql_native_password'  where user='root' and host='localhost';

(root用户localhost 默认的plugin为auth_socket,这种模式下不需要密码也能登录)

FLUSH PRIVILEGES;

4.注释掉/etc/mysql/mysql.conf.d/mysqld.cnf中的bind=127.0.0.1

5.重启服务

service mysql stop

service mysql start

至此即可使用root远程连接,以上安装基于linux  Ubuntu 18.04.4 LTS系统版本腾讯云提供的资源,不同资源可能安装有些差别

执行第4步前3306端口是不通的,执行第4步后3306端口才通

卸载可执行命令

apt-get autoremove mysql-server
用root用户(系统用户)安装的,ubuntu用户却无法登录,但是可以远程登录
 
 
linux系统(基于centos系统)

按照脚本之家上安装 https://www.jb51.net/article/168465.htm
问题1 No match for argument: mysql-community-server
请尝试运行 yum module disable mysql
然后在尝试 yum install mysql-community-server 命令即可
问题2 file /etc/my.cnf from install of mysql-community-server-5.7.31-1.el7.x86_64
参见https://blog.csdn.net/qq_41234094/article/details/105442911
安装之后按照gitlab设置

linux系统(基于centos系统)2

按照文档MYSQL5.7详细安装步骤.md安装

问题1

Error:
Problem: cannot install the best candidate for the job
- nothing provides libsasl2.so.2()(64bit) needed by mysql-community-server-5.7.30-1.el6.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

对应方案则是
找到 /etc/yum.repos.d/mysql-community.repo
打开后,找到 [mysql57-community] 这一块配置(将加粗的两个位置更新一下)
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
gpgcheck=0

参考https://blog.csdn.net/qq_34889197/article/details/105840065

 

问题2

You must reset your password using ALTER USER statement before executing this statement

解决

set global validate_password_policy=LOW

//长度要为8位

SET PASSWORD = PASSWORD('root123456');

 

参考

https://blog.csdn.net/muziljx/article/details/81541896

https://blog.csdn.net/zhanaolu4821/article/details/93622812

 

 

linux免下载安装(https://www.cnblogs.com/wendy-0901/p/12673705.html)

 
Windows上安装参考
https://blog.csdn.net/weixin_43465312/article/details/89897580
https://blog.csdn.net/bobo553443/article/details/81383194
 
windows免安装配置版
https://blog.csdn.net/qq_40277973/article/details/81517479
注意:亲测博客中的路径使用反斜杠不行,会报错,要使用正斜杠
https://www.cnblogs.com/puhongjun/p/10189454.html
 
posted on 2020-07-01 16:42  ScoutDu  阅读(162)  评论(0编辑  收藏  举报