当前位置:网站首页>MySQL 8.0 common (continuous update)
MySQL 8.0 common (continuous update)
2022-07-28 15:23:00 【[email protected]】
1, Change user password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
If appear ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
Check root Whether the permission of is %, If it's a ’root’@‘localhost’ It is amended as follows ’root’@’%’
2,Job for mysql.service failed because a fatal signal was delivered to the control process And Server startup in progress error
I can only say my solution , The individual is in docker Why , Lead to this , So delete docker The container can solve 
3:
3.1peewee.InternalError: (1366, "Incorrect string value: '\\xE6\\x89\\x80\\xE6\\x9C\\x89...' for column 'imp_version' at row 1")
The main problem is the coding format , To insert Chinese into the database, an error is reported .
First look at the database code
show create table vulnerability;
alter table vulnerability change imp_version imp_version varchar(500) character set utf8;
take table Tabular imp_version The field is set to the format utf-8 Of imp_version Field
3.2
peewee.DataError: (1406, “Data too long for column ‘info’ at row 1”)
solve :
The length of the column in the database is not enough to accommodate the size of the data , You can put the one above varchar Of 500 Change it to 5000 Or other , As long as it can accommodate your size .
4, Complete installation steps
First, connect directly :mysql -uroot -p, Because there is no password for the first installation , Go straight back into
Change encryption :ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
use mysql;
Database changed
update user set host = '%' where user ='root';
send root You can connect remotely
FLUSH PRIVILEGES;
Change Password ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
there localhost Remember to change it to %;
If appear :Your password does not satisfy the current policy requirements, This is because 8.0 Password strategy ,
By this order SHOW VARIABLES LIKE 'validate_password%';
Through the command :set global validate_password.number_count=0; Change password policy .
At this time, try to make a remote connection , If appear ERROR 2003 (HY000): Can't connect to MySQL server on
Remote connection failed , see mysql The configuration file ,ubuntu The path of /etc/mysql/mysql.conf.d/mysqld.cnf
The following figure ,bind-address Is the local address , Comment out this configuration , Restart remote access 
If you still can't connect , Check the port , As shown in the figure, it is still 127.0.0.1
Then change the binding port to 0.0.0.0, You can reconnect (bind-address).
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207281415334701.html
边栏推荐
猜你喜欢

crmeb 标准版window+phpstudy8安装教程(二)

For loop

Classic Dijkstra and the longest way

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

Publish raspberry pie web page with cpolar (apache2 installation test)

shellcode编写学习-环境

crmeb标准版4.4都会增加哪些功能

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

celery 相关

No files or folders found to process
随机推荐
7/13 (pond sampling)
Understanding of entropy and cross entropy loss function
idea调试burpsuit插件
3540. Binary search tree
The modified network card name of rocky foundation is eth0
Mysql易错知识点整理(待更新)
mysql 8.0常用(持续更新)
Multi merchant mall system with relatively clean code
Is the expansion operator a deep copy or a shallow copy
DataTables warning: table id=campaignTable - Cannot reinitialise DataTable.解决
The first self introduction quotation
[leetcode] 35. Search the insertion position
Classic Dijkstra and the longest way
No files or folders found to process
滑块还原和验证(法律数据库)
DJ-131/60C电压继电器
使用cpolar发布树莓派网页(apache2的安装测试)
Daily question (retrospective)
Dj-131/60c voltage relay
About the reptile thing