Execute sql query from sql file

后端 未结 4 905
野的像风
野的像风 2021-01-07 10:09

I want to include all tables from a database \"shop\" to mydatabase newshop. I export that \"shop\" database, and now it is named as shop.sql. Is t

4条回答
  •  情深已故
    2021-01-07 11:14

    >>> mysql -u username -p
    >>> show databases;
    >>> use foo;
    >>> source /home/mannu/file.sql
    

    I believe that's what you're looking for? Or did I misunderstand?

提交回复
热议问题