Link to home
Start Free TrialLog in
Avatar of darien_software
darien_softwareFlag for India

asked on

mysql variable type changing automatically

hi
i have changed a variable type from into 10 to varchar
but after few days i find it changed back to int10 without anyone intervention

other variables type in the same table which i did the change before or as it is ..
my Q here is
1.did mysql change it automatically..?any bug doing it or any of my code is doing i out?
2.is there a log to find when it changed or did the change at what time and date?
Avatar of theGhost_k8
theGhost_k8
Flag of India image

well mysql won't change it like this !!
Btw
- do anyone other than you have access to it?
- what operations you do with table? Do you load some dumps or restore from somewhere?

You can check binary logs to see if there is any alter table syntaxes logged!
Avatar of darien_software

ASKER

thanks for reply
can u tell how to check,retrieve binary log file..i am not that kinda dba
ASKER CERTIFIED SOLUTION
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I want little more help.

I am trying to set the binary logging by making changes to my.cnf file as follows

log_bin=mysql_bin
server_id=10

After that I have restarted the server and I have executed the following command.

show global variables like 'log%bin';

But the out put is OFF.

Then how to start the binary logging.
Check above links for variable names.  [http://dev.mysql.com/doc/refman/5.0/en/replication-options-binary-log.html]
use log-bin.
Now the binary logging is enabled.
But I am unable to view the content of the binary file using the mysqlbinlog utility.

The name of the binary log file is mysql-bin.000001

when I am running the mysqlbinlog utility to view the content of the binary log file. It is throwing sql syntax error. I am not finding any solution.

I am using it following way.

mysqlbinlog mysql-bin.000001; -----not working.

mysqlbinlog mysql-bin.000001 > a.txt;

both are not working  and giving the error as follows

ERROR 1064(42000) : you have an error in sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near
mysqlbinlog mysql-bin.000001.