Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to pass the DB user password into the command line tool mysqladmin?

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?

mysqladmin processlist -u root -p 
like image 952
Ethan Allen Avatar asked Sep 30 '12 22:09

Ethan Allen


People also ask

What is the password in MySQL command line?

The default user for MySQL is root and by default it has no password.

How can I connect MySQL database with password?

Enter mysql.exe -uroot -p , and MySQL will launch using the root user. MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you'll connect to the MySQL server.


1 Answers

Just found out the answer....

mysqladmin processlist -u root -pYOURPASSWORDHERE 

No space between your password and the -p

like image 144
Ethan Allen Avatar answered Sep 21 '22 11:09

Ethan Allen