• After having many other problems with my localhost, I’m now stuck on importing the database of my live WordPress site to phpMyAdmin. I keep exceeding the maximum upload time. Bigdump isn’t working, nor is the phpMyAdmin option to keep importing the database in pieces.

    I’ve changed some of the import-related values in php.ini:
    max_execution_time=-1 (have also tried 0, 100, 300)
    max_input_time=-1 (have also tried 0, 100, 300)
    post_max_size=110M
    upload_max_filesize=100M

    The file is only 28MB, so I’m really not sure why it isn’t working! If anyone could point me in the right direction that would be great.
    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • After changing did you restarted localhost server ?

    You can use mysql command mode for using that.

    mysql -u username -p databasename < file.sql

    it will help you

    Thread Starter Sinaasappel

    (@sinaasappel)

    I did restart the localhost server every time I changed something and retried uploading it.

    I’m not exactly sure what you mean with the mysql advice, if you could elaborate a little that would be really great!

    Thanks ??

    Open your command prompt and move to your mysql installation folder. If you are using windows, your path will be like this

    C:\wamp\bin\mysql\mysql5.6.17\bin

    Now, run the command what i gave you in the above to import into your database.
    mysql -u username -p databasename < file.sql

    Thread Starter Sinaasappel

    (@sinaasappel)

    Hello!

    I’m sorry to revive such an old thread but after the last poster’s advice didn’t work either, I gave up. I still haven’t managed to find a way to upload the database and I really want to get my localhost to work. Even though the database is only 35MB, it just keeps timing out phpMyAdmin.

    If I run the command suggested, I get an error saying “acces denied”. Does anyone know what I typed wrong? I entered the username I also use for phpMyAdmin, not sure if that’s correct?

    Thanks!

    Dion

    (@diondesigns)

    Perhaps a dumb question. When you ran this command:

    mysql -u username -p databasename < file.sql

    Did you replace “username” with your database user name, “databasename” with your database name, and “file.sql” with the name of the file you want to import? (The file name must be the complete path to the file.)

    Also note that the above command will not work if the database you want to import is compressed in .zip or .gz format. It can be made to work, but the method is platform-dependent (WIndows, Mac, etc).

    Thread Starter Sinaasappel

    (@sinaasappel)

    I replaced it with the username I use for phpMyAdmin, the name of the database I made for the files to go in and the file name and path. I de-zipped the database, before that I did indeed get another error.
    Does that sound right?

    I just now successfully imported a 2.55 GB, yes, GB .sql file with this method using XAMPP. It took over an hour to complete, but it eventually did. Note that you will see nothing to indicate any ‘progress’ in the CMD window until it is complete; then you will see the cursor blinking.

    To do so, I copied the .sql database file to this location:

    C:\xampp2\mysql\bin

    – opened the CMD window and changed directory to the above location
    – entered the following at the command prompt:

    mysql -u root -p mydatabasename < mysqlfilename.sql

    So this is what was in the CMD window:

    C:\xampp2\mysql\bin>mysql -u root -p mydatabasename < mysqlfilename.sql

    NOTE: you need the < and a space before the sql file name, exactly as shown.

    – hit Enter, then enter again, as XAMPP default DB user has no password although if your DB user has one, this is where it is entered.

    Then it just sits there until completed. On a large file such as yours, it will take a few minutes. You can check the progress by viewing the DB in phpMyAdmin. To refresh, I just clicked on another DB and then back to the one being imported.

    Cheers!
    Lyle

    Thread Starter Sinaasappel

    (@sinaasappel)

    Thanks! Unfortunately, I still get an access denied message even though I followed your instructions exactly:

    Say my database name is site_wrdp1 and my .sql file is site_wrdp1.sql.
    I moved site_wrdp1.sql to C:\xampp\mysql\bin
    I changed the directory in CMD to C:\xampp\mysql\bin
    I entered mysql -u root -p site_wrdp1 < site_wrdp1.sql

    As I hit enter, I got the access denied message. I have no idea what the problem is, sorry if I’m missing something very obvious here! My specific database doesn’t have a password of it own.

    Yes, how you have done it is what worked for me ??

    However, I noticed this about the access denied error on the page where I found these instructions:

    “Troubleshooting the database import
    You may receive one of the following error messages when you try to import a MySQL database using either cPanel or the mysql program:

    ERROR 1044: Access denied for user ‘username1’@’localhost’ to database ‘username2_database’
    This error message occurs when the import file contains an SQL statement that attempts to access a database for the wrong username. Note in this example that username2 in username2_database does not match username1 in ‘username1’@’localhost’. You must edit the import file and change username2 to your new username1.”

    Perhaps try this recommendation to see if it will work.

    Dion

    (@diondesigns)

    Please try this command:

    mysql -uroot -p

    If you do not get a prompt for a password, please post the exact message you receive. If you get a prompt, enter the password for the root DB user.

    If you now see an error mesage, please post the exact error message. If you instead see a mysql> prompt, enter the following command:

    show databases;

    That will list your MySQL databases. Make certain the database you want to use is on that list. To exit MySQL, type the command quit or precc Ctrl-C.

    Thread Starter Sinaasappel

    (@sinaasappel)

    My apologies for the late reply! The instructions by DionDesigns did let me enter mysql and showed me the databases. The database I wanted to use was on the list, so that seems encouraging. What do I do after this?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Exceeding maximum upload time on phpMyAdmin’ is closed to new replies.