I currently use the following but it ALWAYS prompts me to manually type the password. Is there any way to pass it in on the command line when launching the executable?
This should work: mysql -uroot -p'password'
mysql -uroot -p'password'
If you're trying to automate mysql solution, you can use password from variable:
mysql_pass=$(sudo grep -oP "temporary password is generated for root@localhost: \K(.*)" /var/log/mysqld.log)
mysql -uroot -p"$mysql_pass" < somescript.sql