In Workbench, I export my entire DB design into a series of CREATE TABLE statements. I was running into errors due to the size query (there are over 50 tables). Is there something I can do to make MySQL accept large queries?
Also, I have a big SQL to insert dummy data. I assume I’ll run into the same problem as well.
The SQL queries are in a file. I want to programatically open the file, grab the query, then execute it. I’m using PHP/CodeIgniter.
You can run multiple queries by using the mysql commandline client and reading them from file or STDIN. That normally works without any issues and I know a lot of systems that rely on this.
Please see 4.5.1.
mysql— The MySQL Command-Line ToolDocs and non-interactive use.