当前位置: 首页> 房产> 家装 > 多地优化完善疫情防控措施_有什么免费推广项目的好软件_搜索引擎优化主要包括_网络营销的概念及特征

多地优化完善疫情防控措施_有什么免费推广项目的好软件_搜索引擎优化主要包括_网络营销的概念及特征

时间:2025/9/6 15:27:51来源:https://blog.csdn.net/neterrrr/article/details/142128512 浏览次数:0次
多地优化完善疫情防控措施_有什么免费推广项目的好软件_搜索引擎优化主要包括_网络营销的概念及特征

1拉取mysql8镜像并创建容器启动

docker run -d \
-p 3306:3306 \
-v /Users/neter/Desktop/docker-mysql/conf:/etc/mysql/conf.d \
-v /Users/neter/Desktop/docker-mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
--name mysql-8 \
--restart=always \
mysql:8.0.29

其中/Users/neter/Desktop/docker-mysql为主机目录

2增加mysql配置文件

在/Users/neter/Desktop/docker-mysql为主机目录下新建my.conf文件:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]
default-time-zone='+08:00'
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password
skip-host-cache
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
secure-file-priv=/var/lib/mysql-files
user=mysqlpid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/var/run/mysqld/mysqld.sock!includedir /etc/mysql/conf.d/

3修改mysql容器密码

mysql8安装后 默认密码加密的插件不是mysql_native_password,所以之前老版本的mysql客户端工具不能直接使用密码连接必须升级到最新版本,或者修改mysql8密码加密的插件为mysql_native_password

#进入容器:env LANG=C.UTF-8 避免容器中显示中文乱码
docker exec -it mysql-8 env LANG=C.UTF-8 /bin/bash
#进入容器内的mysql命令行
mysql -uroot -p
#使用mysql_native_password密码插件创建新的账户root % 并使用它加密密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';

关键字:多地优化完善疫情防控措施_有什么免费推广项目的好软件_搜索引擎优化主要包括_网络营销的概念及特征

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: