Installation on Ubuntu
sudo apt install -y mysql-server installs Oracle MySQL from Ubuntu's main repository and registers the mysql systemd service, started automatically. Verify with mysql --version.
Securing and first connection
By default the root account authenticates via the auth_socket plugin: connect as the system root with sudo mysql. Run sudo mysql_secure_installation to set passwords and remove insecure defaults. To use a password for root, switch its plugin to mysql_native_password from a SQL prompt.
Files and logs
The configuration entry point is /etc/mysql/my.cnf (which includes mysql.conf.d and conf.d); data lives in /var/lib/mysql and errors are logged to /var/log/mysql/error.log.