Tag Archives: mysql error

mysql error: 1005





ERROR 1005: Can’t create table (errno: 121) Help
Solution:
For some reasons this error appeared for the first time and caused my mysql to drop. But it only happens when clicking on a specific table. So I recreated the table but can’t use the same name again so what i did backup everything with the new table name for that specific table and recreate the database.
It helps.  On some forum they’re actually talking of foreign keys or duplicate keys but i just recreate it.

mysql_error() not displaying error

Error: mysql_error() not displaying error,
Solution:
possible cause is if u got 2 connections, u must supply the connection ur using





Data truncated for column

First time I got this error Data truncated for column. I’m using mysql version 5 and I got a simple query like this:

$val1= 1;
$val2 = 3;
INSERT INTO TBL(‘val1′, ‘val2′) VALUES ($val1, $vall2);
Notice the variable name for $val2 in the query?  I fixed the variable name to $val2 and problem solved.
I really don’t know what causes this but that solves my problem.

I also notice on mysql 5 it returns an error ‘data type’ when let say I got a field that’s integer and upon saving the variable value for that is empty.