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查询遇到问题 SQL 错误 在哪里 MySql在存储过程中创建触发器出现问题 大家帮权衡下两个方案 并给出详细解释 谢谢 请问如下这样的一个SQL语句应该怎么写? 一个 表的设计问题,请指点 两表合并问题? 晕,晕,java调用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启不来了!