Mamp: import large database

Multi tool use
Multi tool use












0















I'm importing a large drupal database to my mac using mamp and I keep finding errors, the phpmyadmin can't import the database. can anyone help me?










share|improve this question























  • Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

    – Matthijs
    Jan 1 at 13:03
















0















I'm importing a large drupal database to my mac using mamp and I keep finding errors, the phpmyadmin can't import the database. can anyone help me?










share|improve this question























  • Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

    – Matthijs
    Jan 1 at 13:03














0












0








0








I'm importing a large drupal database to my mac using mamp and I keep finding errors, the phpmyadmin can't import the database. can anyone help me?










share|improve this question














I'm importing a large drupal database to my mac using mamp and I keep finding errors, the phpmyadmin can't import the database. can anyone help me?







macos drupal mamp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 12:15









alaa mchakkahalaa mchakkah

1




1













  • Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

    – Matthijs
    Jan 1 at 13:03



















  • Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

    – Matthijs
    Jan 1 at 13:03

















Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

– Matthijs
Jan 1 at 13:03





Welcome to StackOverflow! Please improve your question by reading How to ask. For example: we need to see the error.

– Matthijs
Jan 1 at 13:03












1 Answer
1






active

oldest

votes


















1














Importing a large database through phpmyadmin is not recommended (it will typically hangup forever). It's much more efficient to use the command line through the Terminal.



First, make sure you can connect to your database from the command line with one of the following commands:



1/ If your root password isn't set:



mysql -u root


2/ or if you have a root password:



mysql -u root -p


3/ or if you have a specific username and password:



mysql -u username -p




If one of those commands execute correctly, you're good to go to the next step.



Notice you can exit the mysql interactive session anytime with entering:



exit




List your databases:



SHOW databases;


If you don't have your database listed here, you will need to create it:



CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;


Then select your database:



USE database_name;


Finally, import the data from your sql file:



SOURCE "path/to/your/file.sql"




Second method (it suppose your database is already created)



mysql -u username -p database_name < path/to/your/file.sql





share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995349%2fmamp-import-large-database%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Importing a large database through phpmyadmin is not recommended (it will typically hangup forever). It's much more efficient to use the command line through the Terminal.



    First, make sure you can connect to your database from the command line with one of the following commands:



    1/ If your root password isn't set:



    mysql -u root


    2/ or if you have a root password:



    mysql -u root -p


    3/ or if you have a specific username and password:



    mysql -u username -p




    If one of those commands execute correctly, you're good to go to the next step.



    Notice you can exit the mysql interactive session anytime with entering:



    exit




    List your databases:



    SHOW databases;


    If you don't have your database listed here, you will need to create it:



    CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;


    Then select your database:



    USE database_name;


    Finally, import the data from your sql file:



    SOURCE "path/to/your/file.sql"




    Second method (it suppose your database is already created)



    mysql -u username -p database_name < path/to/your/file.sql





    share|improve this answer






























      1














      Importing a large database through phpmyadmin is not recommended (it will typically hangup forever). It's much more efficient to use the command line through the Terminal.



      First, make sure you can connect to your database from the command line with one of the following commands:



      1/ If your root password isn't set:



      mysql -u root


      2/ or if you have a root password:



      mysql -u root -p


      3/ or if you have a specific username and password:



      mysql -u username -p




      If one of those commands execute correctly, you're good to go to the next step.



      Notice you can exit the mysql interactive session anytime with entering:



      exit




      List your databases:



      SHOW databases;


      If you don't have your database listed here, you will need to create it:



      CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;


      Then select your database:



      USE database_name;


      Finally, import the data from your sql file:



      SOURCE "path/to/your/file.sql"




      Second method (it suppose your database is already created)



      mysql -u username -p database_name < path/to/your/file.sql





      share|improve this answer




























        1












        1








        1







        Importing a large database through phpmyadmin is not recommended (it will typically hangup forever). It's much more efficient to use the command line through the Terminal.



        First, make sure you can connect to your database from the command line with one of the following commands:



        1/ If your root password isn't set:



        mysql -u root


        2/ or if you have a root password:



        mysql -u root -p


        3/ or if you have a specific username and password:



        mysql -u username -p




        If one of those commands execute correctly, you're good to go to the next step.



        Notice you can exit the mysql interactive session anytime with entering:



        exit




        List your databases:



        SHOW databases;


        If you don't have your database listed here, you will need to create it:



        CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;


        Then select your database:



        USE database_name;


        Finally, import the data from your sql file:



        SOURCE "path/to/your/file.sql"




        Second method (it suppose your database is already created)



        mysql -u username -p database_name < path/to/your/file.sql





        share|improve this answer















        Importing a large database through phpmyadmin is not recommended (it will typically hangup forever). It's much more efficient to use the command line through the Terminal.



        First, make sure you can connect to your database from the command line with one of the following commands:



        1/ If your root password isn't set:



        mysql -u root


        2/ or if you have a root password:



        mysql -u root -p


        3/ or if you have a specific username and password:



        mysql -u username -p




        If one of those commands execute correctly, you're good to go to the next step.



        Notice you can exit the mysql interactive session anytime with entering:



        exit




        List your databases:



        SHOW databases;


        If you don't have your database listed here, you will need to create it:



        CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;


        Then select your database:



        USE database_name;


        Finally, import the data from your sql file:



        SOURCE "path/to/your/file.sql"




        Second method (it suppose your database is already created)



        mysql -u username -p database_name < path/to/your/file.sql






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 1 at 13:09

























        answered Jan 1 at 12:55









        YoricYoric

        1,2002810




        1,2002810
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995349%2fmamp-import-large-database%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            FugxBD,gm6bHaW4,6qDSrxMb,wDSVDqdJ4eo 1h82Hz0lM4O,cYy,zJP GHJSzb81,p0xdDt9Op9GmLyjF0dvl5Z3
            rj xhH jiSH9KFo0yr4tab,r2Q

            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas