Mysql 명령을 찾을 수 있나요 's', '설정파일에서 my. cnf 와 유사한 방법으로 PHP& 프핀포 ()', '# 39 는 파피니 찾습니다'?
Mysql 이 명령을 # 39 의 내부 없다 추적, it& 좀 지나치게 추상적인 말이다. 파일) 의 5 수 (또는 그 이상?) 위치, 그들은 다시그것들을 캐스케이딩을 로드하십시오 모든 사용할 수 있기 때문이다.
Mysql 이 기본값입니다 위치에 있는지 알아보겠습니다. 둘 이상의 것으로 판명될 경우 이들 각각의 로드하십시오 &. 값을 서로 오버라이드합니다 (나열된 순서에 따라 생각한다). 또한 '수' 매개변수입니다 오버라이드합니다 설정값으로 파일 전부, 그래서. 기본적으로 it& # 39 의 큰 고통을 겪고 있는 버트.
이 때문에, 혼동을 기술입니까 덕에 좋은 기회를 그냥 # 39 의 /etc/my.cnf. it& there& # 39, s, s
(방금 보고 싶은 경우 이 값은: 'SHOW VARIABLES)' # 39, ll, 하지만 you& 할 수 있는 권한이 승인하십시오.)
실제로, request" " 수 있습니다. MySQL 전체 목록은 my. cnf (또는 마이오니 Windows 의 위치가 검색합니다. Sql 쿼리는 어쨌든요 아닙니다 오히려 autoexec.:
$ mysqladmin --help
또는, 이전의 5.7:
$ mysqld --help --verbose
맨 처음 선) 에 있는 메시지를 찾을 수 있습니다 모든 my. cnf 격지에서 바뀌엇어요 찾습니다. On my 실험기계가 그것은:
Default options are read from the following files in the given order:
/etc/my.cnf
/etc/mysql/my.cnf
/usr/etc/my.cnf
~/.my.cnf
또는, Windows 의:
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
C:\Program Files\MySQL\MySQL Server 5.5\my.ini
C:\Program Files\MySQL\MySQL Server 5.5\my.cnf
그러나 이 경우 언제든지 발생할 수 없는 기능을 my. cnf 파일을 이 위치에 . 그래서 자체적으로 중 하나를 사용하여 파일을 만들 수 있습니다 - 구성 파일을 제공하는 샘플링합니다 MySQL 과 분배란 (Linux 의 - 자세한 내용은 "/usr/share/mysql/*.cnf" 파일 및 사용 중 현재 적절한 당신꺼에요 - 복제본에 迈向 "/etc/my.cnf" 그리고 필요에 따라 수정).
또한 또한 명령행을 옵션 "설정값으로 파일" 사용자 지정 또는 마이오니 my. cnf 수 있는 경로를 절실해졌습니다. 예를 들어, 이 경우. MySQL 5.5 점을 마이오니 에 대한 데이터 파일을 Windows - 이 정상적으로 설치되지 않은 디렉터리입니다 나열되는지 함께 《 mysqld - 도움말에서는 - verbose. " 지켜보리니 Windows 에서 서비스 속성 여부를 알아내기 위해 이 경우. 당신꺼에요.
마지막으로, 자세한 내용은 https://dev.mysql.com/doc/refman/8.0/en/option-files.html - 그것은 설명됨 그곳에 확인합니다.
사용할 수 있습니다.
locate my.cnf
whereis my.cnf
find . -name my.cnf
이 작동할 수 있습니다.
strace mysql ";" 2>&1 | grep cnf
on my 실험기계가 이 출력입니다:
stat64("/etc/my.cnf", 0xbf9faafc) = -1 ENOENT (No such file or directory)
stat64("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=4271, ...}) = 0
open("/etc/mysql/my.cnf", O_RDONLY|O_LARGEFILE) = 3
read(3, "# /etc/mysql/my.cnf: The global "..., 4096) = 4096
stat64("/home/xxxxx/.my.cnf", 0xbf9faafc) = -1 ENOENT (No such file or directory)
그래서 마치 () 은 한 () 및 읽기 때문에 /etc/mysql/my.cnf stat64 성공했습니다.
기본적으로 1 일 my. cnf mysql 검색 / etc 폴더에서는. 이 폴더 내에 새로운 것을 만들 수 없는 경우, 나는 이 폴더에 파일을 /etc/my.cnf 한 표시된 대로 설명서 (https://dev.mysql.com/doc/refman/5.6/en/option-files.html).
기존 고객의 mysql 설치 my. cnf 제공한 검색할 수도 있습니다. 다음 명령을 실행할 수 있습니다
sudo find / -name "*.cnf"
Myisam 테이블 없이 함께 사용할 수 있습니다 다음 설정파일에서 innodb mysql 지원 (mac os x 에서 충스러웠으니 포트로부터 mysql 설치 (maverick). 각 명령은 확인하십시오 이 구성파일입니다.
# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /opt/local/var/run/mysql5/mysqld.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /opt/local/var/run/mysql5/mysqld.sock
skip-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /opt/local/var/db/mysql5
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /opt/local/var/db/mysql5
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
Mysql 에서 언급한 것처럼 보일지 단축시킵니다 목록니다 코냐크 구할 수 있습니다. '는' 미스크라드민 - 도움말에서는 my. cnf '파일을 실행하여'. 이 때문에 매우 빠르게 부품에 대한 세부 신경습니까 함께 이용할 수 있습니다.
$ mysqladmin --help | grep -A1 'Default options'
이 부여하느뇨 비슷한 결과가 있습니다.
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
Mysql 설치 방식에 따라 이러한 파일을 networkr. 제공하지 않는다는 것이 아니다. You can 'cat' 그들 '은 직접 만들 것을 확인할 수 있도록 하기 위해 필요한 경우 emc. my. cnf' 제작 및 구성 방식을 선호하는 위치.
mysql --help | grep /my.cnf | xargs ls
여기서 'my. cnf' 에 위치한 Mac/Linux 알려드립니다
ls: cannot access '/etc/my.cnf': No such file or directory
ls: cannot access '~/.my.cnf': No such file or directory
/etc/mysql/my.cnf
이 경우, /etc/mysql/my.cnf '에서'
ls: /etc/my.cnf: No such file or directory
ls: /etc/mysql/my.cnf: No such file or directory
ls: ~/.my.cnf: No such file or directory
/usr/local/etc/my.cnf
이 경우, /usr/local/etc/my.cnf '에서'
>. mysql 브루 (brew) 정보
$ brew info mysql
mysql: stable 5.6.13 (bottled)
http://dev.mysql.com/doc/refman/5.6/en/
Conflicts with: mariadb, mysql-cluster, percona-server
/usr/local/Cellar/mysql/5.6.13 (9381 files, 354M) *
그 마지막 행은 '린스탈러디르' [호스트당 mysql docs] (http://dev.mysql.com/doc/refman/5.0/en/option-files.html)
Mysql 버전에 따라 여러 지역의 살펴보고 합니다.
mysqld --help -verbose | grep my.cnf
For Homebrew:
/usr/local/Cellar/mysql/8.0.11/bin/mysqld (mysqld 8.0.11)
Default possible locations:
/etc/my.cnf
/etc/mysql/my.cnf
~/.my.cnf
Found mine here:
/usr/local/etc/my.cnf