Quantcast
Channel: How do I import a MySQL database in a Python script? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Christian Specht for How do I import a MySQL database in a Python...

You can execute all the SQL in the file at once, by using the official MySQL Connector/Python and the Multi parameter in its cursor.execute method.Quote from the second link:If multi is set to True,...

View Article



Answer by Josep Valls for How do I import a MySQL database in a Python script?

Take care of empty lines in the end of the file by:if line.strip(): cursor.execute(line)

View Article

How do I import a MySQL database in a Python script?

I've seen some similar questions about this on StackOverflow but haven't found an answer that works; see http://stackoverflow.com/questions/4408714/execute-sql-file-with-python-mysqldb AND...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>