fbpx

How to run a MySQL command from the command line

Summary

Use -e to execute the command. Here is what that will look like:

mysql -u [username] -p -e "create database database_name"

Reference

Run a single MySQL query from the command line

 

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top