当前位置:网站首页>mysql 8.0常用(持续更新)
mysql 8.0常用(持续更新)
2022-07-28 14:15:00 【[email protected]】
1,修改用户密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
如果出现ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
检查root的权限是否是%,如果是把’root’@‘localhost’ 修改为’root’@’%’
2,Job for mysql.service failed because a fatal signal was delivered to the control process与Server startup in progress错误
只能说我的解决办法,个人是在docker的原因,导致这个出现,所以删除docker的容器就可以解决
3:
3.1peewee.InternalError: (1366, "Incorrect string value: '\\xE6\\x89\\x80\\xE6\\x9C\\x89...' for column 'imp_version' at row 1")
主要就是编码格式问题,要将中文插入数据库报错。
首先查看数据库编码
show create table vulnerability;
alter table vulnerability change imp_version imp_version varchar(500) character set utf8;
将table表的imp_version字段设置为格式为utf-8的imp_version字段
3.2
peewee.DataError: (1406, “Data too long for column ‘info’ at row 1”)
解决:
数据库的列的长度不够容纳数据的大小,可以把上面的那个varchar的500改为5000或者其他,只要能容纳你的大小即可。
4,完整的安装步骤
首先直接连接:mysql -uroot -p,由于第一次安装没有密码,直接回车进入
更改加密方式:ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
use mysql;
Database changed
update user set host = '%' where user ='root';
使root可以远程连接
FLUSH PRIVILEGES;
修改密码ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
这里的localhost记得看情况修改为%;
如果出现:Your password does not satisfy the current policy requirements,这是由于8.0的密码策略,
通过这个命令SHOW VARIABLES LIKE 'validate_password%';
通过命令:set global validate_password.number_count=0;修改密码策略。
这时尝试进行远程连接,如果出现ERROR 2003 (HY000): Can't connect to MySQL server on
远程连接失败,查看mysql配置文件,ubuntu的路径/etc/mysql/mysql.conf.d/mysqld.cnf
下图中,bind-address为本机地址,注释掉这个配置,重新进行远程访问
如果还是不能连接,查看端口,如图还是为127.0.0.1
那么把绑定端口改为0.0.0.0,则可以重新连接(bind-address)。
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_38641816/article/details/108576399
边栏推荐
- 10、 C enum enumeration
- Repvgg paper explanation and model reproduction using pytoch
- charles如何安装并使用
- Enumeration type
- Search Pfam with Hmmer
- PHP magic method
- What are the main threats to cloud security
- Mysql易错知识点整理(待更新)
- 为什么企业需要用户自治的数字身 份
- Solution: attributeerror: type object 'h5py.h5a AttrID has no attribute __ reduce_ cython__
猜你喜欢

PHP memory horse

Talk about low code / zero code tools

The automatic prompt of vs code code is missing - a tick to solve it

9、 C array explanation

PS modify the length and width pixels and file size of photos

Untitled may

Compilation failure caused by kotlin version upgrade

Solution to the problem of high collapse caused by float (including all methods)

Establishment and traversal of binary tree (implemented in C language)

JS -- realize the rotation chart (complete function)
随机推荐
Modify the default path of Jupiter notebook
Process finished with exit code-1073740791(0xC0000409)
3438. Number system conversion
Bcompare key expired or bcompare license key revoked
Is the expansion operator a deep copy or a shallow copy
Knowledge map Foundation (I) - what is knowledge map
经典Dijkstra与最长路
3564. 日期类
5、 C language judgment statement
边缘技术和小程序容器在智能家居中的应用
Mysql使用left join连表查询时,因连接条件未加索引导致查询很慢
View gnuradio version
3477. 简单排序
Compose learning notes 2 - launchedeffect, status and status management
A problem -- about dragging div in JS, when I change div to round, there will be a bug
10、 C enum enumeration
PS how to crop photos
3540. 二叉搜索树
What are the CCSP cloud security design principles
linear transformation