Reputation: 2160
I am setting password like this:
echo mysql-server mysql-server/root_password password "root" | debconf-set-selections
echo mysql-server mysql-server/root_password_again password "root" | debconf-set-selections
When I want to do something like this:
mysql -u root -p -e 'DELETE FROM mysql.user WHERE User="";'
Please note that the query itself is not the problem right now. I want to be able to run the query through bash without entering password, but as it is right now it still asks for password.
Also tried: mysql -u root -p root -e 'DELETE FROM mysql.user WHERE User="";'
Still, no luck. Also tried to set no password:
echo mysql-server mysql-server/root_password password "" | debconf-set-selections
echo mysql-server mysql-server/root_password_again password "" | debconf-set-selections
but it seems like it still prompts for password.
Upvotes: 0
Views: 63