当前位置:网站首页>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
边栏推荐
- 3564. 日期类
- 苹果iPhone手机APP应用图标隐藏怎么找回恢复显示在iPhone苹果手机桌面显示被隐藏的应用APP图标到iPhone苹果手机桌面?
- JS -- realize the rotation chart (complete function)
- What are the CCSP cloud security design principles
- Keras reported an error using tensorboard: cannot stop profiling
- Xiaobai can understand the 35 necessary questions in MySQL interview
- PHP magic method
- 模板注入总结
- What are the main threats to cloud security
- DataTables warning: table id=campaignTable - Cannot reinitialise DataTable.解决
猜你喜欢

Hard disk partition method

边缘技术和小程序容器在智能家居中的应用

Google lab usage notes

buuctf_ php

35道MySQL面试必问题图解,小白都能看懂

chrome插件调试

使用cpolar发布树莓派网页(apache2的安装测试)

Analysis vulnerability introduction

Wonderful frog -- how simple can it be to abandon the float and use the navigation bar set by the elastic box

MLX90640 红外热成像仪传感器模块开发笔记(八)
随机推荐
滑块还原和验证(法律数据库)
shellcode编写学习-环境
SQL labs detailed problem solving process (less1-less10)
Some considerations for installing Oracle11g
Word creates a title list with automatic numbering
15、 Launch file label of ROS (I)
Mysql易错知识点整理(待更新)
What are the CCSP cloud security design principles
边缘技术和小程序容器在智能家居中的应用
Modify the default path of Jupiter notebook
Search Pfam with Hmmer
Image steganography method
Foundation of knowledge atlas (II) - knowledge expression system of knowledge atlas
Xiaobai can understand the 35 necessary questions in MySQL interview
URP下使用GL进行绘制方法
Iframe tag
Mysql使用left join连表查询时,因连接条件未加索引导致查询很慢
4、 C language operators
PS modify the length and width pixels and file size of photos
2021 year end summary of gains and losses