M BUZZ CRAZE NEWS
// general

Where is mysql's configuration file in ubuntu server 18.04

By Sarah Rodriguez

I recently installed MySql Server 8.0.19 on and EC2 (t2.micro) instance running Ubuntu 18.04.

I'm trying to find the MySql configuration file that's like the my.ini on Windows.

I've looked through almost every file in /etc/mysql/ but none of them are similar to the my.ini that windows uses. Where is this file located on Ubuntu 18.04 and where are the configuration settings read from?

3

2 Answers

Do an update of the locate database and search for my.cnf

sudo locatedb
locate my.cnf

The 2 likely places are

/etc/mysql/my.cnf
/home/$USER/.my.cnf

That is the GENERIC method of finding files on a server.

But ...

EC2 instance

That does not use a generic configuration. The name depends on the type of instance: my-small.cnf, my-medium.cnf, my-large.cnf. Use that for the locate.

Mind also that EC settings often need to be done from within the console and not on command line!

3

The default location should be /etc/mysql

Try searching for my.cnf find -name my.cnf or locate my.cnf from the root directory.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy