开发者

how do i use the mysql general log?

开发者 https://www.devze.com 2023-01-21 03:30 出处:网络
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 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

精彩评论

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

关注公众号