# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# 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 = mysql # Here follows entries for some specific programs # The MySQL server
[mysqld]
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data" port = 3306
socket = mysql old-passwords
character-set-server = latin1
collation-server = latin1_general_ciskip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K# 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
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1# Uncomment the following if you want to log updates
#log-bin=C:/xampp/mysql/data/mysql-bin# Uncomment the following if you are NOT using BDB tables
skip-bdbskip-innodb
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/xampp/mysql/data/
#innodb_log_arch_dir = C:/xampp/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = 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 [isamchk]
key_buffer = 8M
sort_buffer_size = 8M[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M[mysqlhotcopy]
interactive-timeout [WinMySQLadmin]
Server="C:/xampp/mysql/bin/mysqld.exe"
#user=root
#password=
log-slow-queries=c:/slowquery.log
long_query_time=1//------------慢查询日志配置但是在c:\下并没有这个文件.....
解决方案 »
- count 与if的结合
- win7下配置postgresql免安装版,出现了问题。急急急急急急!!
- mysql的order by convert(column using gbk) asc怎么提升性能?
- 中级难度问题
- 我写的自定义函数,请大家帮我优化,功能完全没有问题,就是代码质量不高
- 如何实现多个postgresql之间传输数据???
- MYSQL中如何实现定时执行存储过程?
- ASP+mysql 一个奇怪的问题,希望各位多帮帮忙解决!
- jdbc访问MySql的时产生Connection的问题
- 这个查询到底该如何用mysql的sql语句实现实现,100分,多谢了!
- 求SQL~~~~
- IT民工深夜求SQL查询语句,大大们求救
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# 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 = mysql # Here follows entries for some specific programs # The MySQL server
[mysqld]
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data" port = 3306
socket = mysql old-passwords
character-set-server = latin1
collation-server = latin1_general_ciskip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K# 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
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1# Uncomment the following if you want to log updates
#log-bin=C:/xampp/mysql/data/mysql-bin# Uncomment the following if you are NOT using BDB tables
skip-bdbskip-innodb
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/xampp/mysql/data/
#innodb_log_arch_dir = C:/xampp/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = 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 [isamchk]
key_buffer = 8M
sort_buffer_size = 8M[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M[mysqlhotcopy]
interactive-timeout [WinMySQLadmin]
Server="C:/xampp/mysql/bin/mysqld.exe"
#user=root
#password=
log-slow-queries="c:/slowquery.log"
long_query_time=1加上双引号还是没反应,我是在windowns下用的是xampp
如:
log-slow-queries = mysql_slow.log
即可
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> show variable like '%log%'
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'varia
ble like '%log%'' at line 1
mysql> show variable like '%log%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'varia
ble like '%log%'' at line 1
mysql>
mysql> show variables like '%log%';
+---------------------------------+-----------------+
| Variable_name | Value |
+---------------------------------+-----------------+
| back_log | 50 |
| binlog_cache_size | 32768 |
| expire_logs_days | 0 |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_arch_dir | |
| innodb_log_archive | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | |
| innodb_mirrored_log_groups | 1 |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_error | .\miaojihao.err |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_relay_log_size | 0 |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| sync_binlog | 0 |
+---------------------------------+-----------------+
26 rows in set (0.00 sec)
my.cnf是linux下的吧