首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >连接到mysql时,mysqlsh报告内存不足。mysql命令行可以毫无问题地连接。服务器报告3 3GB可用空间

连接到mysql时,mysqlsh报告内存不足。mysql命令行可以毫无问题地连接。服务器报告3 3GB可用空间
EN

Stack Overflow用户
提问于 2021-11-18 23:59:43
回答 1查看 31关注 0票数 0

有没有人能帮我理解一下..

如果我尝试使用"mysqlsh“连接到MYSQL实例,由于MYSQL实例报告1041 (内存不足),连接失败。

代码语言:javascript
复制
C:\YADAMU>mysqlsh -uroot -poracle -hMYSQL80-01 -Dsys --js --interactive
MySQL Shell 8.0.26

Copyright (c) 2016, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

Type '\help' or '\?' for help; '\quit' to exit.
WARNING: Using a password on the command line interface can be insecure.
Creating a session to 'root@MYSQL80-01/sys'
MySQL Error 1041: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory o
r you can add more swap space

但是,如果我尝试使用'mysql‘连接到同一实例,则连接尝试成功...

代码语言:javascript
复制
C:\YADAMU>mysql -uroot -poracle -hMYSQL80-01 -Dsys
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.26 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql实例和客户端都在docker群的同一节点上运行。容器基于最新的windowserver2022镜像(在任何人建议之前,如果我使用官方的docker for linux镜像,它都可以正常工作,但我需要一个Windows容器来进行这个特定的测试)。

当错误发生时,容器和主机都报告大约3 3gb的空闲内存。

EN

回答 1

Stack Overflow用户

发布于 2021-11-19 00:15:04

通过在命令行中添加"-mysql“来强制mysqlsh使用经典的MySQL协议似乎可以解决这个问题。我仍然想了解mysqlsh使用的经典协议和默认协议之间的区别,以及为什么当容器和主机仍然报告3 3GB的空闲内存时,MySQL会报告内存不足。

-- MySQL,-mc使用经典的MySQL协议8.0.3创建会话

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70028238

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档