当前位置:Gxlcms > 数据库问题 > 一个命令查看mysql的所有配置(原创)

一个命令查看mysql的所有配置(原创)

时间:2021-07-01 10:21:17 帮助过:26人阅读

在mysql的命令提示符下,执行下面一句话:

mysql> show global variables

得到:

技术分享

 

上表的文本内容:

  1. "Variable_name"
  2. "Value"
  3. "auto_increment_increment"
  4. "1"
  5. "auto_increment_offset"
  6. "1"
  7. "autocommit"
  8. "ON"
  9. "automatic_sp_privileges"
  10. "ON"
  11. "back_log"
  12. "50"
  13. "basedir"
  14. "C:\\Program Files (x86)\\MySQL\\MySQL Server 5.1\\"
  15. "big_tables"
  16. "OFF"
  17. "binlog_cache_size"
  18. "32768"
  19. "binlog_direct_non_transactional_updates"
  20. "OFF"
  21. "binlog_format"
  22. "STATEMENT"
  23. "bulk_insert_buffer_size"
  24. "8388608"
  25. "character_set_client"
  26. "utf8"
  27. "character_set_connection"
  28. "utf8"
  29. "character_set_database"
  30. "utf8"
  31. "character_set_filesystem"
  32. "binary"
  33. "character_set_results"
  34. "utf8"
  35. "character_set_server"
  36. "utf8"
  37. "character_set_system"
  38. "utf8"
  39. "character_sets_dir"
  40. "C:\\Program Files (x86)\\MySQL\\MySQL Server 5.1\\share\\charsets\\"
  41. "collation_connection"
  42. "utf8_general_ci"
  43. "collation_database"
  44. "utf8_general_ci"
  45. "collation_server"
  46. "utf8_general_ci"
  47. "completion_type"
  48. "0"
  49. "concurrent_insert"
  50. "1"
  51. "connect_timeout"
  52. "10"
  53. "datadir"
  54. "D:\\ProgramData\\MySQL\\MySQL Server 5.1\\Data\\"
  55. "date_format"
  56. "%Y-%m-%d"
  57. "datetime_format"
  58. "%Y-%m-%d %H:%i:%s"
  59. "default_week_format"
  60. "0"
  61. "delay_key_write"
  62. "ON"
  63. "delayed_insert_limit"
  64. "100"
  65. "delayed_insert_timeout"
  66. "300"
  67. "delayed_queue_size"
  68. "1000"
  69. "div_precision_increment"
  70. "4"
  71. "engine_condition_pushdown"
  72. "ON"
  73. "error_count"
  74. "0"
  75. "event_scheduler"
  76. "OFF"
  77. "expire_logs_days"
  78. "0"
  79. "flush"
  80. "OFF"
  81. "flush_time"
  82. "1800"
  83. "foreign_key_checks"
  84. "ON"
  85. "ft_boolean_syntax"
  86. "+ -><()~*:""""&|"
  87. "ft_max_word_len"
  88. "84"
  89. "ft_min_word_len"
  90. "4"
  91. "ft_query_expansion_limit"
  92. "20"
  93. "ft_stopword_file"
  94. "(built-in)"
  95. "general_log"
  96. "ON"
  97. "general_log_file"
  98. "D:\\ProgramData\\MySQL\\MySQL Server 5.1\\Data\\WIN-2736PK059N6.log"
  99. "group_concat_max_len"
  100. "102400"
  101. "have_community_features"
  102. "YES"
  103. "have_compress"
  104. "YES"
  105. "have_crypt"
  106. "NO"
  107. "have_csv"
  108. "YES"
  109. "have_dynamic_loading"
  110. "YES"
  111. "have_geometry"
  112. "YES"
  113. "have_innodb"
  114. "YES"
  115. "have_ndbcluster"
  116. "NO"
  117. "have_openssl"
  118. "DISABLED"
  119. "have_partitioning"
  120. "YES"
  121. "have_query_cache"
  122. "YES"
  123. "have_rtree_keys"
  124. "YES"
  125. "have_ssl"
  126. "DISABLED"
  127. "have_symlink"
  128. "YES"
  129. "hostname"
  130. "WIN-2736PK059N6"
  131. "identity"
  132. "0"
  133. "ignore_builtin_innodb"
  134. "OFF"
  135. "init_connect"
  136. "SET NAMES utf8"
  137. "init_file"
  138. ""
  139. "init_slave"
  140. ""
  141. "innodb_adaptive_hash_index"
  142. "ON"
  143. "innodb_additional_mem_pool_size"
  144. "8388608"
  145. "innodb_autoextend_increment"
  146. "8"
  147. "innodb_autoinc_lock_mode"
  148. "1"
  149. "innodb_buffer_pool_size"
  150. "378535936"
  151. "innodb_checksums"
  152. "ON"
  153. "innodb_commit_concurrency"
  154. "0"
  155. "innodb_concurrency_tickets"
  156. "500"
  157. "innodb_data_file_path"
  158. "ibdata1:10M:autoextend"
  159. "innodb_data_home_dir"
  160. ""
  161. "innodb_doublewrite"
  162. "ON"
  163. "innodb_fast_shutdown"
  164. "1"
  165. "innodb_file_io_threads"
  166. "4"
  167. "innodb_file_per_table"
  168. "OFF"
  169. "innodb_flush_log_at_trx_commit"
  170. "1"
  171. "innodb_flush_method"
  172. ""
  173. "innodb_force_recovery"
  174. "0"
  175. "innodb_lock_wait_timeout"
  176. "50"
  177. "innodb_locks_unsafe_for_binlog"
  178. "OFF"
  179. "innodb_log_buffer_size"
  180. "4194304"
  181. "innodb_log_file_size"
  182. "76546048"
  183. "innodb_log_files_in_group"
  184. "2"
  185. "innodb_log_group_home_dir"
  186. ".\\"
  187. "innodb_max_dirty_pages_pct"
  188. "90"
  189. "innodb_max_purge_lag"
  190. "0"
  191. "innodb_mirrored_log_groups"
  192. "1"
  193. "innodb_open_files"
  194. "300"
  195. "innodb_rollback_on_timeout"
  196. "OFF"
  197. "innodb_stats_on_metadata"
  198. "ON"
  199. "innodb_support_xa"
  200. "ON"
  201. "innodb_sync_spin_loops"
  202. "20"
  203. "innodb_table_locks"
  204. "ON"
  205. "innodb_thread_concurrency"
  206. "8"
  207. "innodb_thread_sleep_delay"
  208. "10000"
  209. "innodb_use_legacy_cardinality_algorithm"
  210. "ON"
  211. "insert_id"
  212. "0"
  213. "interactive_timeout"
  214. "288000"
  215. "join_buffer_size"
  216. "131072"
  217. "keep_files_on_create"
  218. "OFF"
  219. "key_buffer_size"
  220. "195035136"
  221. "key_cache_age_threshold"
  222. "300"
  223. "key_cache_block_size"
  224. "1024"
  225. "key_cache_division_limit"
  226. "100"
  227. "language"
  228. "C:\\Program Files (x86)\\MySQL\\MySQL Server 5.1\\share\\english\\"
  229. "large_files_support"
  230. "ON"
  231. "large_page_size"
  232. "0"
  233. "large_pages"
  234. "OFF"
  235. "last_insert_id"
  236. "0"
  237. "lc_time_names"
  238. "en_US"
  239. "license"
  240. "GPL"
  241. "local_infile"
  242. "ON"
  243. "log"
  244. "ON"
  245. "log_bin"
  246. "OFF"
  247. "log_bin_trust_function_creators"
  248. "OFF"
  249. "log_bin_trust_routine_creators"
  250. "OFF"
  251. "log_error"
  252. "D:\\ProgramData\\MySQL\\MySQL Server 5.1\\Data\\WIN-2736PK059N6.err"
  253. "log_output"
  254. "FILE"
  255. "log_queries_not_using_indexes"
  256. "OFF"
  257. "log_slave_updates"
  258. "OFF"
  259. "log_slow_queries"
  260. "ON"
  261. "log_warnings"
  262. "1"
  263. "long_query_time"
  264. "3.000000"
  265. "low_priority_updates"
  266. "OFF"
  267. "lower_case_file_system"
  268. "ON"
  269. "lower_case_table_names"
  270. "1"
  271. "max_allowed_packet"
  272. "524288000"
  273. "max_binlog_cache_size"
  274. "4294963200"
  275. "max_binlog_size"
  276. "1073741824"
  277. "max_connect_errors"
  278. "10"
  279. "max_connections"
  280. "1510"
  281. "max_delayed_threads"
  282. "20"
  283. "max_error_count"
  284. "64"
  285. "max_heap_table_size"
  286. "16777216"
  287. "max_insert_delayed_threads"
  288. "20"
  289. "max_join_size"
  290. "18446744073709551615"
  291. "max_length_for_sort_data"
  292. "1024"
  293. "max_prepared_stmt_count"
  294. "16382"
  295. "max_relay_log_size"
  296. "0"
  297. "max_seeks_for_key"
  298. "4294967295"
  299. "max_sort_length"
  300. "1024"
  301. "max_sp_recursion_depth"
  302. "0"
  303. "max_tmp_tables"
  304. "32"
  305. "max_user_connections"
  306. "0"
  307. "max_write_lock_count"
  308. "4294967295"
  309. "min_examined_row_limit"
  310. "0"
  311. "multi_range_count"
  312. "256"
  313. "myisam_data_pointer_size"
  314. "6"
  315. "myisam_max_sort_file_size"
  316. "107374182400"
  317. "myisam_mmap_size"
  318. "4294967295"
  319. "myisam_recover_options"
  320. "OFF"
  321. "myisam_repair_threads"
  322. "1"
  323. "myisam_sort_buffer_size"
  324. "23068672"
  325. "myisam_stats_method"
  326. "nulls_unequal"
  327. "myisam_use_mmap"
  328. "OFF"
  329. "named_pipe"
  330. "OFF"
  331. "net_buffer_length"
  332. "16384"
  333. "net_read_timeout"
  334. "30"
  335. "net_retry_count"
  336. "10"
  337. "net_write_timeout"
  338. "60"
  339. "new"
  340. "OFF"
  341. "old"
  342. "OFF"
  343. "old_alter_table"
  344. "OFF"
  345. "old_passwords"
  346. "OFF"
  347. "open_files_limit"
  348. "2048"
  349. "optimizer_prune_level"
  350. "1"
  351. "optimizer_search_depth"
  352. "62"
  353. "optimizer_switch"
  354. "index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on"
  355. "pid_file"
  356. "D:\\ProgramData\\MySQL\\MySQL Server 5.1\\Data\\WIN-2736PK059N6.pid"
  357. "plugin_dir"
  358. "C:\\Program Files (x86)\\MySQL\\MySQL Server 5.1\\lib/plugin"
  359. "port"
  360. "3306"
  361. "preload_buffer_size"
  362. "32768"
  363. "profiling"
  364. "OFF"
  365. "profiling_history_size"
  366. "15"
  367. "protocol_version"
  368. "10"
  369. "pseudo_thread_id"
  370. "0"
  371. "query_alloc_block_size"
  372. "8192"
  373. "query_cache_limit"
  374. "1048576"
  375. "query_cache_min_res_unit"
  376. "4096"
  377. "query_cache_size"
  378. "127926272"
  379. "query_cache_type"
  380. "ON"
  381. "query_cache_wlock_invalidate"
  382. "OFF"
  383. "query_prealloc_size"
  384. "8192"
  385. "rand_seed1"
  386. ""
  387. "rand_seed2"
  388. ""
  389. "range_alloc_block_size"
  390. "4096"
  391. "read_buffer_size"
  392. "65536"
  393. "read_only"
  394. "OFF"
  395. "read_rnd_buffer_size"
  396. "262144"
  397. "relay_log"
  398. ""
  399. "relay_log_index"
  400. ""
  401. "relay_log_info_file"
  402. "relay-log.info"
  403. "relay_log_purge"
  404. "ON"
  405. "relay_log_space_limit"
  406. "0"
  407. "report_host"
  408. ""
  409. "report_password"
  410. ""
  411. "report_port"
  412. "3306"
  413. "report_user"
  414. ""
  415. "rpl_recovery_rank"
  416. "0"
  417. "secure_auth"
  418. "OFF"
  419. "secure_file_priv"
  420. ""
  421. "server_id"
  422. "0"
  423. "shared_memory"
  424. "OFF"
  425. "shared_memory_base_name"
  426. "MYSQL"
  427. "skip_external_locking"
  428. "ON"
  429. "skip_name_resolve"
  430. "ON"
  431. "skip_networking"
  432. "OFF"
  433. "skip_show_database"
  434. "OFF"
  435. "slave_compressed_protocol"
  436. "OFF"
  437. "slave_exec_mode"
  438. "STRICT"
  439. "slave_load_tmpdir"
  440. "C:\\Windows\\TEMP"
  441. "slave_net_timeout"
  442. "3600"
  443. "slave_skip_errors"
  444. "OFF"
  445. "slave_transaction_retries"
  446. "10"
  447. "slow_launch_time"
  448. "2"
  449. "slow_query_log"
  450. "ON"
  451. "slow_query_log_file"
  452. "C:\\Program Files (x86)\\MySQL\\MySQL Server 5.1\\mysqllog/slowquery.log"
  453. "socket"
  454. "MySQL"
  455. "sort_buffer_size"
  456. "262144"
  457. "sql_auto_is_null"
  458. "ON"
  459. "sql_big_selects"
  460. "ON"
  461. "sql_big_tables"
  462. "OFF"
  463. "sql_buffer_result"
  464. "OFF"
  465. "sql_log_bin"
  466. "ON"
  467. "sql_log_off"
  468. "OFF"
  469. "sql_log_update"
  470. "ON"
  471. "sql_low_priority_updates"
  472. "OFF"
  473. "sql_max_join_size"
  474. "18446744073709551615"
  475. "sql_mode"
  476. "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  477. "sql_notes"
  478. "ON"
  479. "sql_quote_show_create"
  480. "ON"
  481. "sql_safe_updates"
  482. "OFF"
  483. "sql_select_limit"
  484. "18446744073709551615"
  485. "sql_slave_skip_counter"
  486. ""
  487. "sql_warnings"
  488. "OFF"
  489. "ssl_ca"
  490. ""
  491. "ssl_capath"
  492. ""
  493. "ssl_cert"
  494. ""
  495. "ssl_cipher"
  496. ""
  497. "ssl_key"
  498. ""
  499. "storage_engine"
  500. "InnoDB"
  501. "sync_binlog"
  502. "0"
  503. "sync_frm"
  504. "ON"
  505. "system_time_zone"
  506. ""
  507. "table_definition_cache"
  508. "256"
  509. "table_lock_wait_timeout"
  510. "50"
  511. "table_open_cache"
  512. "264"
  513. "table_type"
  514. "InnoDB"
  515. "thread_cache_size"
  516. "64"
  517. "thread_handling"
  518. "one-thread-per-connection"
  519. "thread_stack"
  520. "196608"
  521. "time_format"
  522. "%H:%i:%s"
  523. "time_zone"
  524. "SYSTEM"
  525. "timed_mutexes"
  526. "OFF"
  527. "timestamp"
  528. "1484874972"
  529. "tmp_table_size"
  530. "23068672"
  531. "tmpdir"
  532. "C:\\Windows\\TEMP"
  533. "transaction_alloc_block_size"
  534. "8192"
  535. "transaction_prealloc_size"
  536. "4096"
  537. "tx_isolation"
  538. "REPEATABLE-READ"
  539. "unique_checks"
  540. "ON"
  541. "updatable_views_with_limit"
  542. "YES"
  543. "version"
  544. "5.1.53-community-log"
  545. "version_comment"
  546. "MySQL Community Server (GPL)"
  547. "version_compile_machine"
  548. "ia32"
  549. "version_compile_os"
  550. "Win32"
  551. "wait_timeout"
  552. "288000"
  553. "warning_count"
  554. "1"

 

如果需要在众多的全局变量中,找到某一个变量的值的办法是在上边的命令后面使用 “LIKE %需要的特征值%”模糊查找包含特征值的全局配置。

例如:

1.mysql查看数据库的数据存放目录命令:

>mysql> show global variables like "%datadir%";

技术分享

 

一个命令查看mysql的所有配置(原创)

标签:stop   dap   shared   flush   tput   share   repair   sql   rem   

人气教程排行