user984003
user984003

Reputation: 29597

Set startup parameters for MySQL on Ubuntu

I installed vanilla MySQL 8.0 on Ubuntu 20.04.

I see the following files in /etc/mysql/ (using ls command):

conf.d
debian-start
debian.cnf
my.cnf
my.cnf.fallback
mysql.cnf
mysql.conf.d

my.cnf looks like this:

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

I have tried adding this to the end of my.cnf:

innodb_lock_wait_timeout=4
transaction_isolation=READ-COMMITTED

I then stop MySQL and try to start it. Starting gives me a error without any info.

Upvotes: 0

Views: 706

Answers (1)

user984003
user984003

Reputation: 29597

Alright, I figured it out. I also needed to add an [mysqld] line.

my.cnf now looks like this where the first 2 lines were there originally.

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

[mysqld]
innodb_lock_wait_timeout=4
transaction_isolation=READ-COMMITTED

MySQL now starts properly and I have verified that the parameters have been set.

Upvotes: 1

Related Questions