distal-attribute
distal-attribute
distal-attribute
distal-attribute

MySql database schema silently reverting to previous version

jerome.mrozak posted 2 years ago in General
I'm using MySQL 5.5.15 with Heidi 6.0.0.3603. I'm working in a Microsoft Windows 7 laptop. I'm seeing a behavior that I can't figure is with Heidi or MySQL, so I'm asking here.

I make changes to my table structure -- drop a table, add a field, change the field to a different data type. I then Save the changes and even use them for testing.

I then do other things -- close the lid of the laptop and go to sleep, etc., use the laptop for other things -- and later come back to the laptop to do more work.

When I begin work I'm told that my field doesn't exist in the table schema. My other work has also disappeared. Even the dropped tables spring back to life.

I'm currently "saved" from disaster by creating periodic SQL exports. However, old schemas being reapplied to my DB is disconcerting. Is there some HeidiSQL, or MySQL, feature that keeps versions around?

Thanks for any answers, Jerome.
ansgar posted 2 years ago
Check your server versions, before and after that happens.

One guess could be you have two MySQL services running on your Windows, and instance A was closed when you shut down your laptop. Now, on a reboot, instance B is automatically starting. But this implies that you would know about a second MySQL instance as you must have installed them both. Seems like you don't know about a second instance, do you?
jerome.mrozak posted 2 years ago
On my laptop I go to the Task Manager and have these running:
heidisql.exe *32
mysqld.exe *32

I have mysql as a service, running at boot. What I have sometimes is a WAMP server (wampmanager.exe), and *aha* this starts up its own mssql.exe!

So you think that the two servers are using a race condition to update schemas? When I'm doing my Heidi work I'm not using, even forgetting, about the other service. This might imply that wampmanager is doing something periodic with its schema.
ansgar posted 2 years ago
I hope this "mssql.exe" was a typo, and you mean "mysql.exe" instead?

I think your two servers have both the same data, only the one is slightly older.
jerome.mrozak posted 2 years ago
Umm, yeah. I *did* mean that Wamp started up its own MySQL instance. There is no MS SQL in this mix.

I'll start watching out for that, and see if my problem occurs again.

Since I've done a stupid thing, I'll see if the suggested fix works, which will take weeks (long-term test).

Jerome.

ansgar posted 2 years ago
Weeks? You just need to disable your wampmanager.
jerome.mrozak posted 2 years ago
I've disabled it already. By "weeks", I mean to watch over time if this really was the issue. Thank you again for remembering something (two+ instances) that I'd never thought of.

Jerome.
ansgar posted 2 years ago
Ah ok. I would be more sure if I was you. Don't expect some magic going on here :)

Please login to leave a reply, or register at first.