New answers tagged


After reseting root password, I could connect with workbench. I still can't connect with old users (which were already created), but connecting with root and creating new users with workbench allows me to connect with these new users. It looks it has something to do with the password, or the way MySQL Server stores password for users. I don't know the ...


A malformed package is usually a sign that you didn't connect to the expected service (in this case the MySQL server). Doublecheck that the expected server is running behind the given port on the given machine.


Maybe you can create DELETE after INSERT. So, if like you case, you can use this trigger. CREATE TRIGGER `delete_after_insert` AFTER INSERT ON `outpatient` FOR EACH ROW BEGIN DELETE FROM `resident` WHERE `residentID` = '' END; You don't need old values for insert to outpatient. because you insert first and get the id for delete on resident ...


You should take the vbalues of OLD and use them in INSERT command. Something like this: CREATE TRIGGER triger_name_after_delete AFTER DELETE ON resident FOR EACH ROW BEGIN -- Insert record into Outpatient table INSERT INTO Outpatient (residentID, [rest columns names...] ) VALUES ( OLD.residentID, OLD.[rest columns names...]) END;


Switch to mysqldump; it is aimed at scripting, whereas Workbench is aimed at UI. Use the option --routines in addition to whatever else you need. --no-data gives you just the schema.

Top 50 recent answers are included