mysql的二进制日志怎么打开? 必须要加参数--log-bin[=file_name]启动吗?我一般都是用service mysqld start启动的,我怎么把这个参数加上啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把这个参数写到mysql的配置文件中 可以加到你的 /etc/my.cnf 中。 我怎么知道它生效了没有啊?在网上查说,通过show variables like 'log_bin'查看二进制日志是否启动,可是我在/etc/my.cnf里加上log-bin=file-name,然后重启MySQL,再查,还是显示off啊! 你加在什么位置了? 要加在 [mysqld] 这一节中。 不行你就手工 set @@log_bin=on; 我的配置文件:[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysqlmax_allowed_packet = 16Mtable_cache = 512sort_buffer_size = 2Mread_buffer_size = 2Mread_rnd_buffer_size = 8Mmyisam_sort_buffer_size = 64Mthread_cache_size = 8query_cache_size = 32Mtmp_table_size=64Mmax_heap_table_size=64Mlog-bin=/home/mysql_bin.log# Default to using old password format for compatibility with mysql 3.x# clients (those using the mysqlclient10 compatibility package).old_passwords=1[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid我再启Mysql启不来了! up up up up up up up up up up up up up up up sql 如何写? group by 后,除了sum,还可以使用其他函数吗? 求批量导出mysql数据库备份文件的命令 mysql 如何随机插入中文? 关闭MySQL后如何启动 mysql数据库表文件属主问题 mysql触发器的问题 急啊,急啊!如何判断一个表里的字段域已经存在了!!! Mysql大数据的处理,求大神指导 【求助】数据库检索分类性能问题 mysql如何使用engine mysql 存储过程中更新问题
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet = 16M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
tmp_table_size=64M
max_heap_table_size=64M
log-bin=/home/mysql_bin.log
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid我再启Mysql启不来了!