Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT

A little late here but generally I’ve seen this problem occur when you get a ‘tablespace full’ error when running in a ‘innodb_file_per_table’ mode. Without going into too much detail (more here), the database server’s tablespace is defined by the innodb_data_file_path setting and by default is rather small. Even made larger, the ‘tablespace full’ can … Read more

How to send email from MySQL 5.1

If you have an SMTP service running, you can outfile to the drop directory. If you have high volume, you may result with duplicate file names, but there are ways to avoid that. Otherwise, you will need to create a UDF. Here’s a sample trigger solution: CREATE TRIGGER test.autosendfromdrop BEFORE INSERT ON test.emaildrop FOR EACH … Read more