mysql-user-db-creator-bash-script
mysql-user-db-creator-bash-script copied to clipboard
throws a promt. How to by pass or disable?
@parmonov98 Note that the password that you pass in the parameter is the password for the new user.
And MySQL credentials for new DB/user creation will be taken from the MySQL config file ~/.my.cnf
.
If you don't have one, you can simply create a .my.cnf
file in the home directory, with
[client]
host=localhost
user=[your-db-user]
password=[your-db-pass]
If ~/.my.cnf
doesn't exist, you will be prompted for the root password. For an automated environment, it's recommended to make use of the MySQL config file.