查詢 mysqld 版本 32bits / 64bits

2018091117:53
 

1 row in set (0.00 sec)
+-------------------------+--------+
| version_compile_machine | x86_64 |
+-------------------------+--------+
| Variable_name           | Value  |
+-------------------------+--------+
mysql> show variables like 'version_compile_machine';





取得 mysqld 設定檔的位置
會有好幾個,
特別注意的是
依照順序,後面的 my.cnf 中的命令,會蓋掉前面一個 my.cnf 的設定
$ /usr/local/mysql/bin/mysqld --help --verbose |more
2018-09-12T06:57:46.313536Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-09-12T06:57:46.313784Z 0 [Warning] Changed limits: max_connections: 214 (requested 500)
2018-09-12T06:57:46.313797Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 512)
/usr/local/mysql/bin/mysqld  Ver 5.7.16-log for Linux on x86_64 (Source distribution)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

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

Starts the MySQL database server.

Usage: /usr/local/mysql/bin/mysqld [OPTIONS]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
The following groups are read: mysqld server mysqld-5.7
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file,
   
以上例而言,
/etc/my.conf 中有指定 
  datadir = "/home/mysql/data"

但第二個  my.cnf 檔案
/etc/mysql/my.cnf 中又設定
  datadir = "/mnt/mysql/data"

這樣則會以第二個(後面檔案) 的命令為主