Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two settings in your php.ini that can prevent you from importing a database above a certain file size in PHPMyAdmin.</p> <p>First locate your php.ini with the following script:</p> <pre><code>&lt;?php phpinfo(); </code></pre> <p>The path is listed under "Loaded Configuration File". If you're using Ubuntu this will most likely be /etc/php5/apache2/php.ini</p> <p>Then edit the file as root (used nano for you here, but any text editor is fine):</p> <pre><code>sudo nano /etc/php5/apache2/php.ini </code></pre> <p>Find the following two lines in that configuration file:</p> <pre><code>; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 2M </code></pre> <p>and</p> <pre><code>; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size post_max_size = 8M </code></pre> <p>And increase both of those numbers to a number higher than the file size of your zipped database, for example:</p> <pre><code>upload_max_filesize = 1000M post_max_size = 1000M </code></pre> <p>Save your changes, then restart your server:</p> <pre><code>sudo /etc/init.d/apache2 restart </code></pre> <p>Then refresh your PHPMyAdmin and you'll see your changes reflected there, and you'll be able to import your database.</p> <p>Alternatively you could do this right in the command line instead of through PHPMyAdmin, which will bypass those PHP settings entirely:</p> <pre><code>mysql -p -u username database_name &lt; file.sql </code></pre> <p>Just be sure to unzip it first.</p> <p>Edit: I should note that changing these two configuration settings to a really high number could potentially expose you to DOS attacks if your application processes arbitrary POST data or file uploads without any validation, so it's probably a good idea to change them back to their defaults after importing your database.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload