Solved

mysql variable type changing automatically

Posted on 2012-04-02
6
378 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:darien_software
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 37795501
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!
0
 

Author Comment

by:darien_software
ID: 37795628
thanks for reply
can u tell how to check,retrieve binary log file..i am not that kinda dba
0
 
LVL 21

Accepted Solution

by:
theGhost_k8 earned 500 total points
ID: 37795753
Execute below queries on mysql prompt:
show global variables like 'log%bin';
show global variables like 'datadir';

If 1st returns ON, that means you've binary logs enabled. goto your data-directory at path specified by above query.
on system prompt execute:
mysqlbinlog binlogfilename > tempfile.txt

Read more: http://dev.mysql.com/doc/refman/5.0/en/binary-log.html
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:darien_software
ID: 37799533
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.
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 37800708
Check above links for variable names.  [http://dev.mysql.com/doc/refman/5.0/en/replication-options-binary-log.html]
use log-bin.
0
 

Author Comment

by:darien_software
ID: 37815586
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.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question