How to delete mysql database through shell command

前端 未结 8 1512
遥遥无期
遥遥无期 2020-12-13 05:48

I use the pylons and sqlalchemy. I constantly update the schema files and delete and recreate the database so that new schema can be made.

Every time I do this by o

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 05:55

    In general, you can pass any query to mysql from shell with -e option.

    mysql -u username -p -D dbname -e "DROP DATABASE dbname"
    

提交回复
热议问题