I have a 400MB large sql backup file. I'm trying to import that file into MySQL database using WAMP->import, but the import was unsuccessful due to many reasons such as upload file size is too large and so on. So, i've gone ahead and made a few changes to the config PHP and MySQL settings under WAMP. Changes made are
Under WAMP->MySQL->my.ini
max_allowed_packet = 800M
read_buffer_size = 2014K
Under WAMP->PHP->PHP.ini
max_input_time = 20000
memory_limit = 128M
My question is, Is this the right way to import such a large sql files using WAMP->import?
If so, did i make the right changes to the config files? What are the maximum values allowed for the above variable?
解决方案
You can import large files this command line way:
mysql -h yourhostname -u username -p databasename < yoursqlfile.sql