MySQL is insanely slow on fresh installed Ubuntu 17.10 Yesterday I installed Ubuntu 17.10 on my desktop and today I wanted to migrate a MySQL datababase (php artisan migrate:fresh with laravel), but my database was very slow. The migrations only, took around 30 seconds.

On my macbook these migrations take only a few seconds (under 5 seconds).

I tried google and got a lot of settings I could change in my.cnf.
For example the following settings:

[mysqld]
innodb_io_capacity = 2000
innodb_read_io_threads = 64
innodb_thread_concurrency = 0
innodb_write_io_threads = 64


This didn't made it any faster. I also found the option for slow query logging, but the output file is empty after the migrations.

Does someone have any other solutions?

Ps. I removed the settings from my.cnf because it didn't made it faster and I wasn't sure whether to keep the settings or not.

I have mysql-server-5.7.
long_query_time = 1 (or possibly a lower value); this will help get something useful in the slowlog.

With rare exceptions, "You can't tune you way out of a performance problem."

How much RAM?

Find some slow SQL so we can discuss it.  Please provide the corresponding SHOW CREATE TABLE so we know what the table(s) look like.