MySQL Error Solution: Can’t create table ‘tablename’ (errno: 150)

MySQL error: Can’t create table ‘tablename’ (errno: 150) can occur when you, for example, upload a backup and MySQL is powered to create table 1 which refers to table 2, which essentially does not exist yet. You can solve by inserting the lines at the beginning in the backup:

Continue reading “MySQL Error Solution: Can’t create table ‘tablename’ (errno: 150)”

How to change join_buffer_size in MySQL

I will give an example of changing join_buffer_size in MySQL.
join_buffer_size determines the size of the buffer for index scanning and joins without indexes. I recommend adding indexes or slightly increasing join_buffer_size (but in this case a full table scan will be performed).

Continue reading “How to change join_buffer_size in MySQL”