当前位置:   article > 正文

关于MySQL Command Line Client 运行闪退问题解决,my.ini文件内容

关于MySQL Command Line Client 运行闪退问题解决,my.ini文件内容

MySQL Command Line Client 运行闪退问题解决,缺少my.ini文件_通过下载msi安装mysql,双击打开mysql 8.2 command line client --CSDN博客

打开mysql  Command Line Client 发现直接闪退,一直不明所以(这里是没输密码,直接一闪而过那样),然后借鉴了上面的博客,发现了问题。但是我发现我没有my.ini文件,而且这个文件几乎都需要积分下载,于是我把内容贴在下面。大家复制到记事本里,文件名先改成my.ini.txt,复制完之后,再改为my.ini即可

  1. ; Example MySQL config file for medium systems.
  2. ;
  3. ; This is for a large system with memory of 1G-2G where the system runs mainly
  4. ; MySQL.
  5. ;
  6. ; MySQL programs look for option files in a set of
  7. ; locations which depend on the deployment platform.
  8. ; You can copy this option file to one of those
  9. ; locations. For information about these locations, see:
  10. ; http://dev.mysql.com/doc/mysql/en/option-files.html
  11. ;
  12. ; In this file, you can use all long options that a program supports.
  13. ; If you want to know which options a program supports, run the program
  14. ; with the "--help" option.
  15. ; The following options will be passed to all MySQL clients
  16. [client]
  17. ;password = your_password
  18. port = 3306
  19. socket = /tmp/mysql.sock
  20. ; Here follows entries for some specific programs
  21. ; The MySQL server
  22. [wampmysqld]
  23. ;skip-grant-tables
  24. port = 3306
  25. socket = /tmp/mysql.sock
  26. key_buffer_size = 64M
  27. max_allowed_packet = 16M
  28. ;Added to reduce memory used (minimum is 400)
  29. table_definition_cache = 600
  30. sort_buffer_size = 2M
  31. net_buffer_length = 8K
  32. read_buffer_size = 2M
  33. read_rnd_buffer_size = 2M
  34. myisam_sort_buffer_size = 32M
  35. ;Path to mysql install directory
  36. basedir="D:/xue_xi_ruan_jian/wamp/bin/mysql/mysql5.7.14"
  37. log-error="D:/xue_xi_ruan_jian/wamp/logs/mysql.log"
  38. ;Verbosity Value 1 Errors only, 2 Errors and warnings , 3 Errors, warnings, and notes
  39. log_error_verbosity=2
  40. ;Path to data directory
  41. datadir="D:/xue_xi_ruan_jian/wamp/bin/mysql/mysql5.7.14/data"
  42. ;Path to the language
  43. ;See Documentation:
  44. ; http://dev.mysql.com/doc/refman/5.7/en/error-message-language.html
  45. lc-messages-dir="D:/xue_xi_ruan_jian/wamp/bin/mysql/mysql5.7.14/share"
  46. lc-messages=en_US
  47. ; The default storage engine that will be used when create new tables
  48. default-storage-engine=MYISAM
  49. ; New for MySQL 5.6 default_tmp_storage_engine if skip-innodb enable
  50. ; default_tmp_storage_engine=MYISAM
  51. ;To avoid warning messages
  52. secure_file_priv="D:/xue_xi_ruan_jian/wamp/tmp"
  53. skip-ssl
  54. explicit_defaults_for_timestamp=true
  55. ; The default SQL mode in MySQL 5.7 includes these modes:
  56. ; ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION.
  57. ; no line sql-mode="" gives default SQL mode
  58. ; To clear the SQL mode explicitly, set it to an empty string using sql-mode=""
  59. ;sql-mode=""
  60. ;sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"
  61. ; Don't listen on a TCP/IP port at all. This can be a security enhancement,
  62. ; if all processes that need to connect to mysqld run on the same host.
  63. ; All interaction with mysqld must be made via Unix sockets or named pipes.
  64. ; Note that using this option without enabling named pipes on Windows
  65. ; (via the "enable-named-pipe" option) will render mysqld useless!
  66. ;
  67. ;skip-networking
  68. ; Disable Federated by default
  69. skip-federated
  70. ; Replication Master Server (default)
  71. ; binary logging is required for replication
  72. ;log-bin=mysql-bin
  73. ; binary logging format - mixed recommended
  74. ;binlog_format=mixed
  75. ; required unique id between 1 and 2^32 - 1
  76. ; defaults to 1 if master-host is not set
  77. ; but will not function as a master if omitted
  78. server-id = 1
  79. ; Replication Slave (comment out master section to use this)
  80. ; New for MySQL 5.6 if no slave
  81. skip-slave-start
  82. ;
  83. ; To configure this host as a replication slave, you can choose between
  84. ; two methods :
  85. ;
  86. ; 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  87. ; the syntax is:
  88. ;
  89. ; CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  90. ; MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  91. ;
  92. ; where you replace <host>, <user>, <password> by quoted strings and
  93. ; <port> by the master's port number (3306 by default).
  94. ;
  95. ; Example:
  96. ;
  97. ; CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  98. ; MASTER_USER='joe', MASTER_PASSWORD='secret';
  99. ;
  100. ; OR
  101. ;
  102. ; 2) Set the variables below. However, in case you choose this method, then
  103. ; start replication for the first time (even unsuccessfully, for example
  104. ; if you mistyped the password in master-password and the slave fails to
  105. ; connect), the slave will create a master.info file, and any later
  106. ; change in this file to the variables' values below will be ignored and
  107. ; overridden by the content of the master.info file, unless you shutdown
  108. ; the slave server, delete master.info and restart the slaver server.
  109. ; For that reason, you may want to leave the lines below untouched
  110. ; (commented) and instead use CHANGE MASTER TO (see above)
  111. ;
  112. ; required unique id between 2 and 2^32 - 1
  113. ; (and different from the master)
  114. ; defaults to 2 if master-host is set
  115. ; but will not function as a slave if omitted
  116. ;server-id = 2
  117. ;
  118. ; The replication master for this slave - required
  119. ;master-host = <hostname>
  120. ;
  121. ; The username the slave will use for authentication when connecting
  122. ; to the master - required
  123. ;master-user = <username>
  124. ;
  125. ; The password the slave will authenticate with when connecting to
  126. ; the master - required
  127. ;master-password = <password>
  128. ;
  129. ; The port the master is listening on.
  130. ; optional - defaults to 3306
  131. ;master-port = <port>
  132. ;
  133. ; binary logging - not required for slaves, but recommended
  134. ;log-bin=mysql-bin
  135. ; Point the following paths to different dedicated disks
  136. ;tmpdir = /tmp/
  137. ;log-update = /path-to-dedicated-directory/hostname
  138. ; The InnoDB tablespace encryption feature relies on the keyring_file
  139. ; plugin for encryption key management, and the keyring_file plugin
  140. ; must be loaded prior to storage engine initialization to facilitate
  141. ; InnoDB recovery for encrypted tables. If you do not want to load the
  142. ; keyring_file plugin at server startup, specify an empty string.
  143. early-plugin-load=""
  144. ; Uncomment the following if you are using InnoDB tables
  145. ;innodb_data_home_dir = C:/mysql/data/
  146. innodb_data_file_path = ibdata1:10M:autoextend
  147. ;innodb_log_group_home_dir = C:/mysql/data/
  148. ;innodb_log_arch_dir = C:/mysql/data/
  149. ; You can set .._buffer_pool_size up to 50 - 80 %
  150. ; of RAM but beware of setting memory usage too high
  151. innodb_buffer_pool_size = 16M
  152. ; Set .._log_file_size to 25 % of buffer pool size
  153. innodb_log_file_size = 5M
  154. innodb_log_buffer_size = 8M
  155. innodb_flush_log_at_trx_commit = 1
  156. innodb_lock_wait_timeout = 60
  157. innodb_flush_method=normal
  158. [mysqldump]
  159. quick
  160. max_allowed_packet = 16M
  161. [mysql]
  162. no-auto-rehash
  163. ; Remove the next comment character if you are not familiar with SQL
  164. ;safe-updates
  165. [isamchk]
  166. key_buffer_size = 20M
  167. sort_buffer_size = 20M
  168. read_buffer_size = 2M
  169. write_buffer_size = 2M
  170. [myisamchk]
  171. key_buffer_size = 20M
  172. sort_buffer_size_size = 20M
  173. read_buffer_size = 2M
  174. write_buffer_size = 2M
  175. [mysqlhotcopy]
  176. interactive-timeout
  177. [mysqld]
  178. port = 3306

这样复制过去即可。

 

已经可以运行了 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/499334
推荐阅读
相关标签
  

闽ICP备14008679号