Magento 2: I'm unable to save new productsMagento duplicate the product getting innodb lock timeout errormagento 2 : Data tool migration transform date/timeMagento 2 Data Migration Tool Not connecting to remote serverMagento 1 to 2 data migration root'@'localhost Access denied situationLocal dev version bromeWhen using Data Migration tool I get exception undefined indexMagento 2 Migration From custom tables (non-magento) to magento 2After migration customers can't log using m1 passwordMagento 2: Setup version for module is not specifiedHow to manually import/migrate orders & customers from Magento1 to Magento 2 database tables?

What does it mean to describe someone as a butt steak?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

"You are your self first supporter", a more proper way to say it

Languages that we cannot (dis)prove to be Context-Free

Fencing style for blades that can attack from a distance

How old can references or sources in a thesis be?

Why do falling prices hurt debtors?

Today is the Center

US citizen flying to France today and my passport expires in less than 2 months

Smoothness of finite-dimensional functional calculus

How does one intimidate enemies without having the capacity for violence?

What's the output of a record cartridge playing an out-of-speed record

Python: next in for loop

TGV timetables / schedules?

What would happen to a modern skyscraper if it rains micro blackholes?

Problem of parity - Can we draw a closed path made up of 20 line segments...

Why was the small council so happy for Tyrion to become the Master of Coin?

What defenses are there against being summoned by the Gate spell?

Maximum likelihood parameters deviate from posterior distributions

LaTeX closing $ signs makes cursor jump

What typically incentivizes a professor to change jobs to a lower ranking university?

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

Have astronauts in space suits ever taken selfies? If so, how?

How do I create uniquely male characters?



Magento 2: I'm unable to save new products


Magento duplicate the product getting innodb lock timeout errormagento 2 : Data tool migration transform date/timeMagento 2 Data Migration Tool Not connecting to remote serverMagento 1 to 2 data migration root'@'localhost Access denied situationLocal dev version bromeWhen using Data Migration tool I get exception undefined indexMagento 2 Migration From custom tables (non-magento) to magento 2After migration customers can't log using m1 passwordMagento 2: Setup version for module is not specifiedHow to manually import/migrate orders & customers from Magento1 to Magento 2 database tables?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















My website is running on Magento 2.
I have migrated data from Magento 1.x to version 2.1 using UB data migration tool.
Now I am planning to upgrade Magento 2.1.3. After Magento upgrade



I am unable to save new products. It shows error:




SQLSTATE[HY000]: General error: 1449 The user specified as a definer
('rb_magento2'@'localhost') does not exist, query was: INSERT INTO
catalog_product_entity (entity_id, attribute_set_id, type_id,
sku, has_options, required_options) VALUES (?, ?, ?, ?, ?, ?)




The user rb_magento2 is or live Magento database but I have created a copy of Magento on a new server with the different username.










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • stackoverflow.com/q/10169960/2047249

    – Marius
    Feb 24 '17 at 11:50











  • Check the user has all privileges

    – Ramki
    Feb 24 '17 at 12:07











  • I have provided all the privileges but it is having different user

    – Paras Arora
    Feb 24 '17 at 12:08

















1















My website is running on Magento 2.
I have migrated data from Magento 1.x to version 2.1 using UB data migration tool.
Now I am planning to upgrade Magento 2.1.3. After Magento upgrade



I am unable to save new products. It shows error:




SQLSTATE[HY000]: General error: 1449 The user specified as a definer
('rb_magento2'@'localhost') does not exist, query was: INSERT INTO
catalog_product_entity (entity_id, attribute_set_id, type_id,
sku, has_options, required_options) VALUES (?, ?, ?, ?, ?, ?)




The user rb_magento2 is or live Magento database but I have created a copy of Magento on a new server with the different username.










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • stackoverflow.com/q/10169960/2047249

    – Marius
    Feb 24 '17 at 11:50











  • Check the user has all privileges

    – Ramki
    Feb 24 '17 at 12:07











  • I have provided all the privileges but it is having different user

    – Paras Arora
    Feb 24 '17 at 12:08













1












1








1








My website is running on Magento 2.
I have migrated data from Magento 1.x to version 2.1 using UB data migration tool.
Now I am planning to upgrade Magento 2.1.3. After Magento upgrade



I am unable to save new products. It shows error:




SQLSTATE[HY000]: General error: 1449 The user specified as a definer
('rb_magento2'@'localhost') does not exist, query was: INSERT INTO
catalog_product_entity (entity_id, attribute_set_id, type_id,
sku, has_options, required_options) VALUES (?, ?, ?, ?, ?, ?)




The user rb_magento2 is or live Magento database but I have created a copy of Magento on a new server with the different username.










share|improve this question
















My website is running on Magento 2.
I have migrated data from Magento 1.x to version 2.1 using UB data migration tool.
Now I am planning to upgrade Magento 2.1.3. After Magento upgrade



I am unable to save new products. It shows error:




SQLSTATE[HY000]: General error: 1449 The user specified as a definer
('rb_magento2'@'localhost') does not exist, query was: INSERT INTO
catalog_product_entity (entity_id, attribute_set_id, type_id,
sku, has_options, required_options) VALUES (?, ?, ?, ?, ?, ?)




The user rb_magento2 is or live Magento database but I have created a copy of Magento on a new server with the different username.







magento-2.1 product database migration magento2-migration-tool






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 19 '17 at 16:00









Rafael Corrêa Gomes

4,64023365




4,64023365










asked Feb 24 '17 at 11:43









Paras AroraParas Arora

423419




423419





bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • stackoverflow.com/q/10169960/2047249

    – Marius
    Feb 24 '17 at 11:50











  • Check the user has all privileges

    – Ramki
    Feb 24 '17 at 12:07











  • I have provided all the privileges but it is having different user

    – Paras Arora
    Feb 24 '17 at 12:08

















  • stackoverflow.com/q/10169960/2047249

    – Marius
    Feb 24 '17 at 11:50











  • Check the user has all privileges

    – Ramki
    Feb 24 '17 at 12:07











  • I have provided all the privileges but it is having different user

    – Paras Arora
    Feb 24 '17 at 12:08
















stackoverflow.com/q/10169960/2047249

– Marius
Feb 24 '17 at 11:50





stackoverflow.com/q/10169960/2047249

– Marius
Feb 24 '17 at 11:50













Check the user has all privileges

– Ramki
Feb 24 '17 at 12:07





Check the user has all privileges

– Ramki
Feb 24 '17 at 12:07













I have provided all the privileges but it is having different user

– Paras Arora
Feb 24 '17 at 12:08





I have provided all the privileges but it is having different user

– Paras Arora
Feb 24 '17 at 12:08










2 Answers
2






active

oldest

votes


















0














1 - You can fix that renaming the file app/etc/env.php to app/etc/env.php.bkp.



2 - Use the command cat app/etc/env.php.bkp to see the DB credentials.



3 - Run these commands below changing the data like DB host, user, password, base URL, admin user, password, etc..



php -f ./bin/magento setup:install --base-url=http://localhost/ 
--db-host=db
--db-name=magento
--db-user=magento
--db-password=magento
--admin-firstname=Magento
--admin-lastname=Commerce
--admin-email=user@example.com
--admin-user=admin
--admin-password=admin123
--language=en_US
--currency=USD
--timezone=America/Chicago
--use-rewrites=1
--backend-frontname=admin


4 - Finalize running these commands:



alias mage="php -d memory_limit=-1 -f bin/magento"

mage maintenance:enable
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/di/ var/tmp/ var/generation/ pub/static/frontend/ ;
mage setup:upgrade &&
mage setup:db-data:upgrade &&
mage dev:source-theme:deploy &&
mage cache:flush &&
mage indexer:reindex &
chmod -R 775 pub/static/ pub/media/ var/
mage setup:static-content:deploy
mage setup:di:compile
mage maintenance:disable
mage setup:db-schema:upgrade
mage setup:db-data:upgrade
mage setup:db:status


Done!






share|improve this answer






























    0














    I had the same problem and I got the solution doing this:




    1. Export database using the following command:




      mysqldump -h [database_host] --user=[database_username] --password=[password] --single-transaction main | sed -e 's/DEFINER[ ]*=[ ]*[^*]**/*/' | gzip > /path/to/database_name.sql.gz


    2. Import the database again.


    The error is caused because the user rb_magento2 doesn't exist or hasn't permissions.



    Also you can try creating a user with name rb_magento2 but the first solution is the most recommended.



    Check this doc:
    https://devdocs.magento.com/guides/v2.2/cloud/live/stage-prod-migrate.html#troubleshooting-the-database-migration






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      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: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      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%2fmagento.stackexchange.com%2fquestions%2f161635%2fmagento-2-im-unable-to-save-new-products%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      1 - You can fix that renaming the file app/etc/env.php to app/etc/env.php.bkp.



      2 - Use the command cat app/etc/env.php.bkp to see the DB credentials.



      3 - Run these commands below changing the data like DB host, user, password, base URL, admin user, password, etc..



      php -f ./bin/magento setup:install --base-url=http://localhost/ 
      --db-host=db
      --db-name=magento
      --db-user=magento
      --db-password=magento
      --admin-firstname=Magento
      --admin-lastname=Commerce
      --admin-email=user@example.com
      --admin-user=admin
      --admin-password=admin123
      --language=en_US
      --currency=USD
      --timezone=America/Chicago
      --use-rewrites=1
      --backend-frontname=admin


      4 - Finalize running these commands:



      alias mage="php -d memory_limit=-1 -f bin/magento"

      mage maintenance:enable
      rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/di/ var/tmp/ var/generation/ pub/static/frontend/ ;
      mage setup:upgrade &&
      mage setup:db-data:upgrade &&
      mage dev:source-theme:deploy &&
      mage cache:flush &&
      mage indexer:reindex &
      chmod -R 775 pub/static/ pub/media/ var/
      mage setup:static-content:deploy
      mage setup:di:compile
      mage maintenance:disable
      mage setup:db-schema:upgrade
      mage setup:db-data:upgrade
      mage setup:db:status


      Done!






      share|improve this answer



























        0














        1 - You can fix that renaming the file app/etc/env.php to app/etc/env.php.bkp.



        2 - Use the command cat app/etc/env.php.bkp to see the DB credentials.



        3 - Run these commands below changing the data like DB host, user, password, base URL, admin user, password, etc..



        php -f ./bin/magento setup:install --base-url=http://localhost/ 
        --db-host=db
        --db-name=magento
        --db-user=magento
        --db-password=magento
        --admin-firstname=Magento
        --admin-lastname=Commerce
        --admin-email=user@example.com
        --admin-user=admin
        --admin-password=admin123
        --language=en_US
        --currency=USD
        --timezone=America/Chicago
        --use-rewrites=1
        --backend-frontname=admin


        4 - Finalize running these commands:



        alias mage="php -d memory_limit=-1 -f bin/magento"

        mage maintenance:enable
        rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/di/ var/tmp/ var/generation/ pub/static/frontend/ ;
        mage setup:upgrade &&
        mage setup:db-data:upgrade &&
        mage dev:source-theme:deploy &&
        mage cache:flush &&
        mage indexer:reindex &
        chmod -R 775 pub/static/ pub/media/ var/
        mage setup:static-content:deploy
        mage setup:di:compile
        mage maintenance:disable
        mage setup:db-schema:upgrade
        mage setup:db-data:upgrade
        mage setup:db:status


        Done!






        share|improve this answer

























          0












          0








          0







          1 - You can fix that renaming the file app/etc/env.php to app/etc/env.php.bkp.



          2 - Use the command cat app/etc/env.php.bkp to see the DB credentials.



          3 - Run these commands below changing the data like DB host, user, password, base URL, admin user, password, etc..



          php -f ./bin/magento setup:install --base-url=http://localhost/ 
          --db-host=db
          --db-name=magento
          --db-user=magento
          --db-password=magento
          --admin-firstname=Magento
          --admin-lastname=Commerce
          --admin-email=user@example.com
          --admin-user=admin
          --admin-password=admin123
          --language=en_US
          --currency=USD
          --timezone=America/Chicago
          --use-rewrites=1
          --backend-frontname=admin


          4 - Finalize running these commands:



          alias mage="php -d memory_limit=-1 -f bin/magento"

          mage maintenance:enable
          rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/di/ var/tmp/ var/generation/ pub/static/frontend/ ;
          mage setup:upgrade &&
          mage setup:db-data:upgrade &&
          mage dev:source-theme:deploy &&
          mage cache:flush &&
          mage indexer:reindex &
          chmod -R 775 pub/static/ pub/media/ var/
          mage setup:static-content:deploy
          mage setup:di:compile
          mage maintenance:disable
          mage setup:db-schema:upgrade
          mage setup:db-data:upgrade
          mage setup:db:status


          Done!






          share|improve this answer













          1 - You can fix that renaming the file app/etc/env.php to app/etc/env.php.bkp.



          2 - Use the command cat app/etc/env.php.bkp to see the DB credentials.



          3 - Run these commands below changing the data like DB host, user, password, base URL, admin user, password, etc..



          php -f ./bin/magento setup:install --base-url=http://localhost/ 
          --db-host=db
          --db-name=magento
          --db-user=magento
          --db-password=magento
          --admin-firstname=Magento
          --admin-lastname=Commerce
          --admin-email=user@example.com
          --admin-user=admin
          --admin-password=admin123
          --language=en_US
          --currency=USD
          --timezone=America/Chicago
          --use-rewrites=1
          --backend-frontname=admin


          4 - Finalize running these commands:



          alias mage="php -d memory_limit=-1 -f bin/magento"

          mage maintenance:enable
          rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/di/ var/tmp/ var/generation/ pub/static/frontend/ ;
          mage setup:upgrade &&
          mage setup:db-data:upgrade &&
          mage dev:source-theme:deploy &&
          mage cache:flush &&
          mage indexer:reindex &
          chmod -R 775 pub/static/ pub/media/ var/
          mage setup:static-content:deploy
          mage setup:di:compile
          mage maintenance:disable
          mage setup:db-schema:upgrade
          mage setup:db-data:upgrade
          mage setup:db:status


          Done!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 19 '17 at 16:10









          Rafael Corrêa GomesRafael Corrêa Gomes

          4,64023365




          4,64023365























              0














              I had the same problem and I got the solution doing this:




              1. Export database using the following command:




                mysqldump -h [database_host] --user=[database_username] --password=[password] --single-transaction main | sed -e 's/DEFINER[ ]*=[ ]*[^*]**/*/' | gzip > /path/to/database_name.sql.gz


              2. Import the database again.


              The error is caused because the user rb_magento2 doesn't exist or hasn't permissions.



              Also you can try creating a user with name rb_magento2 but the first solution is the most recommended.



              Check this doc:
              https://devdocs.magento.com/guides/v2.2/cloud/live/stage-prod-migrate.html#troubleshooting-the-database-migration






              share|improve this answer





























                0














                I had the same problem and I got the solution doing this:




                1. Export database using the following command:




                  mysqldump -h [database_host] --user=[database_username] --password=[password] --single-transaction main | sed -e 's/DEFINER[ ]*=[ ]*[^*]**/*/' | gzip > /path/to/database_name.sql.gz


                2. Import the database again.


                The error is caused because the user rb_magento2 doesn't exist or hasn't permissions.



                Also you can try creating a user with name rb_magento2 but the first solution is the most recommended.



                Check this doc:
                https://devdocs.magento.com/guides/v2.2/cloud/live/stage-prod-migrate.html#troubleshooting-the-database-migration






                share|improve this answer



























                  0












                  0








                  0







                  I had the same problem and I got the solution doing this:




                  1. Export database using the following command:




                    mysqldump -h [database_host] --user=[database_username] --password=[password] --single-transaction main | sed -e 's/DEFINER[ ]*=[ ]*[^*]**/*/' | gzip > /path/to/database_name.sql.gz


                  2. Import the database again.


                  The error is caused because the user rb_magento2 doesn't exist or hasn't permissions.



                  Also you can try creating a user with name rb_magento2 but the first solution is the most recommended.



                  Check this doc:
                  https://devdocs.magento.com/guides/v2.2/cloud/live/stage-prod-migrate.html#troubleshooting-the-database-migration






                  share|improve this answer















                  I had the same problem and I got the solution doing this:




                  1. Export database using the following command:




                    mysqldump -h [database_host] --user=[database_username] --password=[password] --single-transaction main | sed -e 's/DEFINER[ ]*=[ ]*[^*]**/*/' | gzip > /path/to/database_name.sql.gz


                  2. Import the database again.


                  The error is caused because the user rb_magento2 doesn't exist or hasn't permissions.



                  Also you can try creating a user with name rb_magento2 but the first solution is the most recommended.



                  Check this doc:
                  https://devdocs.magento.com/guides/v2.2/cloud/live/stage-prod-migrate.html#troubleshooting-the-database-migration







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 26 '18 at 19:49

























                  answered Sep 26 '18 at 19:44









                  Andres Rojas OrozcoAndres Rojas Orozco

                  165110




                  165110



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • 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%2fmagento.stackexchange.com%2fquestions%2f161635%2fmagento-2-im-unable-to-save-new-products%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







                      Popular posts from this blog

                      Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

                      Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                      How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2