开发者

how do i use the mysql general log?

I n开发者_C百科otice a very weird problem in my code. I am inserting a value of 128 but in my database it says 127.

I'd like to look at the mysql general/query logs however i dont ever see any log files produce no matter what i do. I tried -l , -l with an absolute path and --general_log_file. No luck. I also used mysqladmin flush-logs. Still nothing


Are you using a signed TINYINT datatype by any chance?

CREATE TABLE my_table (id TINYINT);
Query OK, 0 rows affected (0.03 sec)

INSERT INTO my_table VALUES (128);
Query OK, 1 row affected, 1 warning (0.00 sec)

SELECT * FROM my_table;
+------+
| id   |
+------+
|  127 |
+------+
1 row in set (0.00 sec)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜