12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-28 13:26:58
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
操作记录mkdirmysql40ll41cdmy42cdmysql/43ll45tar-xvfmysql-8.0.19-1.el7.x86_64.rpm-bundle.tar46ll47rpm-ivhmysql-community-common-8.0.19-1.el7.x86_64.rpm--nodeps--
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
操作记录
mkdirmysql40ll41cdmy42cdmysql/43ll45tar-xvfmysql-8.0.19-1.el7.x86_64.rpm-bundle.tar46ll47rpm-ivhmysql-community-common-8.0.19-1.el7.x86_64.rpm--nodeps--force48rpm-ivhmysql-community-libs-8.0.19-1.el7.x86_64.rpm--nodeps--force49rpm-ivhmysql-community-client-8.0.19-1.el7.x86_64.rpm--nodeps--force50rpm-ivhmysql-community-server-8.0.19-1.el7.x86_64.rpm--nodeps--force51rpm-qa|grepmysql52mysqld--initialize;53chownmysql:mysql/var/lib/mysql-R;54systemctlstartmysqld.service;55systemctlenablemysqld;56cat/var/log/mysqld.log|greppassword57mysql-uroot-p58systemctlstopfirewalld.service;59systemctldisablefirewalld.service;60systemctlmaskfirewalld.service;61ifconfig
通过 cat /var/log/mysqld.log | grep password
命令查看数据库的密码
通过 mysql -uroot -p
敲回车键进入数据库登陆界面
通过 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
命令来修改密码
通过 exit; 命令退出 MySQL,然后通过新密码再次登陆
.通过以下命令,进行远程访问的授权
createuser'root'@'%'identifiedwithmysql_native_passwordby'root';grantallprivilegeson*.*to'root'@'%'withgrantoption;flushprivileges;
通过 ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER
;
命令修改加密规则,MySql8.0 版本 和 5.0 的加密规则不一样,而现在的可视化工具只支持旧的加密方式。
通过 flush privileges;
命令刷新修该后的权限
通过以下命令,关闭 firewall(防火墙)
systemctlstopfirewalld.service;systemctldisablefirewalld.service;systemctlmaskfirewalld.service;
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19