If you want to use proper database features in mysql – the sort that Postgresql has as standard – you need to use the InnoDB storage engine rather than the default MyISAM.
To see what sort of storage engine your tables are currently using do this in the mysql shell:
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'test';
Replace ‘test’ with the name of your database. Then, to convert the table to the InnoDB engine, do this:
alter table tablename ENGINE = InnoDB;
Replace ‘tablename’ with the name of the table you want to convert.