mysql -u username database_name < file.sql
If you do not want to use the password on the command line then you can do the following:
For linux, add ~/.my.cnf and put the following in it
For MacOS with homebrew, add ~/.mysql.cnf and put the same contents in the file as above.
Note: some MacOS terminal setups my use the ~/.my.cnf instead.
Now, you can do the following command without using a password:
I am nuts about books. I read on all kinds of topics. I attempt to review each book I read for the sake of my own enrichment as well as conversation starters with others.
You never know what you will find in an attic! Usually there is a hodgepodge of things buried under dust.
Most of what is included here are notes to myself. The majority of folks will not find interest in these posts.