You need a certain type of router capable of portforwarding.
If your home hosting, probably only going to get it to work with Hamachi.
Not to mention the strain on your pc, if you're serious about it buy a VPS.
In both of your cases, my guess would be your emulator doesen't use the account_locked column, but your Database has it anyways, My best bet would be looking into if you've installed the wrong Database, or disabling mySQL's Strict Mode.
Disabling strict mode *may* fix it as it will ignore...