当前位置: 首页 > news >正文

菏泽 兼职做网站老薛主机做电影网站

菏泽 兼职做网站,老薛主机做电影网站,seo就业指导,珠海企业建站程序文章目录 【MySQL】如何使用Shared-memory协议(Windows)连接MySQL数据库连接MySQL的协议使用Shared-memory协议(Windows)连接MySQL步骤1#xff1a;确认MySQL服务器已启用Shared-memory连接启动Shared-memory连接方法 步骤2#xff1a;客户端使用shared-memory连接MySQL服务器… 文章目录 【MySQL】如何使用Shared-memory协议(Windows)连接MySQL数据库连接MySQL的协议使用Shared-memory协议(Windows)连接MySQL步骤1确认MySQL服务器已启用Shared-memory连接启动Shared-memory连接方法 步骤2客户端使用shared-memory连接MySQL服务器。例1客户端使用shared-memory连接MySQL服务器例2默认连接MySQL服务器 常见错误 小结 【MySQL】如何使用Shared-memory协议(Windows)连接MySQL数据库 连接MySQL的协议 在MySQL中可以通过指定 --protocol参数选择连接MySQL的协议。 连接协议Connection Protocals --protocol{TCP|SOCKET|PIPE|MEMORY}TCP/IP (ALL) -Transmission Control Protocal/Internet Protocal-Connection:local remote-Supports Clasic X protocol Socket file (Unix including Linux/Mac) -Connection:local -Supports Clasic X protocol Named Pipe (Win) -Connection:local -Supports Clasic Shared Memory (Win) -Connection:local -Supports Clasic参考 https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_protocol 4.2.3 Command Options for Connecting to the Server 使用Shared-memory协议(Windows)连接MySQL 在Windows环境中支持共享内存Shared-memory连接连接MySQL。 如果服务器启用了Shared-memory连接客户端就可以通过使用–protocolMEMORY选项使用Shared-memory连接MySQL。 使用Shared-memory协议(Windows)连接MySQL时能够提高MySQL的性能具体测评请参考如下官方链接的介绍。 参考 Improving the Performance of MySQL on Windows https://dev.mysql.com/blog-archive/improving-the-performance-of-mysql-on-windows/ 步骤1确认MySQL服务器已启用Shared-memory连接 查看是否启用Shared-memory连接。 mysql show variables like shared_memory; ---------------------- | Variable_name | Value | ---------------------- | shared_memory | OFF | ---------------------- 1 row in set, 1 warning (0.03 sec)mysql如果值是ON则表示启用OFF表示禁用状态。 启动Shared-memory连接方法 打开配置文件my.ini将shared-memory变量和shared-memory-base-name变量前的注释去掉并保存。 例 # The next three options are mutually exclusive to SERVER_PORT below. # skip-networking # enable-named-pipeshared-memoryshared-memory-base-nameMYSQL ※ my.ini文件的位置可以通过【mysql --help】命令中的Default options内容查看。 例 Default options are read from the following files in the given order: C:\windows\my.ini C:\windows\my.cnf C:\my.ini C:\my.cnf E:\Soft\MySQL8.0\my.ini E:\Soft\MySQL8.0\my.cnf重新启动MySQL服务器。 net stop MySQL服务名 net start MySQL服务名例 C:\Users\Administratornet stop mysql80 MySQL80 服务正在停止. MySQL80 服务已成功停止。C:\Users\Administratornet start mysql80 MySQL80 服务正在启动 .. MySQL80 服务已经启动成功。3.查看shared-memory连接启用状态。 C:\Users\Administratormysql -u root -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.28 MySQL Community Server - GPLCopyright (c) 2000, 2022, 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 show variables like shared_memory; ---------------------- | Variable_name | Value | ---------------------- | shared_memory | ON | ---------------------- 1 row in set, 1 warning (0.01 sec)mysql步骤2客户端使用shared-memory连接MySQL服务器。 例1客户端使用shared-memory连接MySQL服务器 通过指定–protocolMEMORY客户端可以使用shared-memory连接MySQL服务器。 C:\Users\Administratormysql --protocolMEMORY -u root -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.28 MySQL Community Server - GPLCopyright (c) 2000, 2022, 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 \s -------------- mysql Ver 8.0.28 for Win64 on x86_64 (MySQL Community Server - GPL)Connection id: 9 Current database: Current user: rootlocalhost SSL: Not in use Using delimiter: ; Server version: 8.0.28 MySQL Community Server - GPL Protocol version: 10 Connection: Shared memory: MYSQL Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: gbk Conn. characterset: gbk TCP port: 0 Binary data as: Hexadecimal Uptime: 1 min 58 secThreads: 2 Questions: 12 Slow queries: 0 Opens: 134 Flush tables: 3 Open tables: 53 Queries per second avg: 0.101 --------------mysql 例2默认连接MySQL服务器 启用shared-memory连接后不指定–protocol时本地连接也会使用shared-memory连接MySQL服务器。 C:\Users\Administratormysql -u root -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 8.0.28 MySQL Community Server - GPLCopyright (c) 2000, 2022, 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 \s -------------- mysql Ver 8.0.28 for Win64 on x86_64 (MySQL Community Server - GPL)Connection id: 10 Current database: Current user: rootlocalhost SSL: Not in use Using delimiter: ; Server version: 8.0.28 MySQL Community Server - GPL Protocol version: 10 Connection: Shared memory: MYSQL Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: gbk Conn. characterset: gbk TCP port: 0 Binary data as: Hexadecimal Uptime: 3 min 52 secThreads: 2 Questions: 17 Slow queries: 0 Opens: 134 Flush tables: 3 Open tables: 53 Queries per second avg: 0.073 --------------mysql常见错误 当服务器shared memory连接未启用的时候使用shared memory连接会报如下的错误 C:\Users\Administratormysql --protocolMEMORY -u root -p Enter password: ******** ERROR 2038 (HY000): Cant open shared memory; client could not create request event (2) 可参考如上的方法在服务器端进行相应的配置。 小结 本文介绍了在Windows环境中如何使用shared memory协议连接MySQL数据库的方法。
http://www.pierceye.com/news/937146/

相关文章:

  • 在线设计的网站android 网站开发
  • 河北省建设厅网站官网织梦手机网站制作
  • 网站建设管理物联网的发展前景
  • 广州网站建设外贸做vip视频网站赚钱吗
  • 模板网建站山西 网站制作
  • 网站建设捌金手指花总二七网页制作与设计的内容
  • 阿凡达网站建设网网络营销包括什么内容
  • 网站设计师是什么做的好的国外网站
  • 19年做网站织梦cms源码
  • 做定制网站怎么样原创网站设计
  • 淮安网站建设 淮安网站制作反向代理wordpress
  • 七台河北京网站建设深圳营销策划
  • 陕西西乡网站建设如何做网站效果图
  • 三门峡高端网站建设临安建设规划局网站
  • 可信网站认证哪里有网站建设分金手指排名一
  • 十大品牌网站建设专业网站的利弊
  • 如何查看网站域名360seo
  • 苏州网站设计kgwl手机网站全屏代码
  • 网站开发工程师就业前景免费企业网站模板
  • 网站建设额企业建设网站对客户的好处
  • 济南网站制作设计公司WordPress文章相册修改
  • 购物网站建设思维导构图电商平台建设方案
  • 一个网站一年的费用多少惠州网站制作哪里好
  • 网站界面设计材料收集国内外包网站
  • 自如网站做的好 服务网站开发实训
  • 档案网站建设的意义网页制作工具可以分为
  • 网站建设价格是哪些方面决定的wordpress32m
  • 建设公司网站哪家好网站建设 中企动力洛阳分公司
  • 如何做自己的大淘客网站开公司建网站
  • 在线网站设计工具腾讯做的电子商务网站