Can we run MySQL query from windows command prompt? If so, how can we do that and process the query result through command prompt?
Launch the MySQL Command-Line Client. To launch the client, enter the following command in a Command Prompt window: mysql -u root -p . The -p option is needed only if a root password is defined for MySQL. Enter the password when prompted.
To open the MySQL command line from cmd, you need to use username root with your password. Now write the below command to open MySQL command line. Now press the enter button. After that you need to provide the password.
Try to use mysql — the MySQL command-line tool with '--execute=statement' or '-e statement' option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With