Basically, I need to setup a database from a bash script. I have a script db.sql that does all thi开发者_如何学JAVAs. Now how do I run this script from bash?
Database system is mysql
You simply need to start mysql and feed it with the content of db.sql:
mysql -u user -p < db.sql
If you want to run a script to a database:
mysql -u user -p data_base_name_here < db.sql
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论