"MySQL server is gone." Hm.
I use a stroller and a chef to set up my virtual development environment. I am almost there, but in the last step the chef fails while trying to execute my external db_setup.sql file. I can execute the same SSH'ing script on a virtual server, and it installs without difficulty.
This is my problem code (in cookbooks / database / recipies / mysql.rb):
# Query a database from a sql script on disk mysql_database 'run script' do database_name 'my_db' connection mysql_connection_info retries 3 sql { ::File.open('/vagrant/db_setup.sql').read } action :query end
The file is 6.9mb, and the error I get when starting the vagrant provision
is:
==> default: [2014-08-24T16:04:53-07:00] ERROR: mysql_database[run script] (database::mysql line 50) had an error: Mysql::Error: MySQL server has gone away
For what it's worth, when I replace the db_setup.sql file with a smaller, simpler file that just creates a few empty tables, it runs without difficulty.
Any suggestions? Thank you in advance!
Brian fitzgerald
source share