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?

whey we use polarized capacitor?

If Manufacturer spice model and Datasheet give different values which should I use?

declaring a variable twice in IIFE

black dwarf stars and dark matter

How to add power-LED to my small amplifier?

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Prevent a directory in /tmp from being deleted

Could a US political party gain complete control over the government by removing checks & balances?

Can a German sentence have two subjects?

Pronouncing Dictionary.com's W.O.D "vade mecum" in English

Draw simple lines in Inkscape

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

Is there a minimum number of transactions in a block?

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

Copycat chess is back

Schwarzchild Radius of the Universe

The magic money tree problem

What is the offset in a seaplane's hull?

Are tax years 2016 & 2017 back taxes deductible for tax year 2018?

"which" command doesn't work / path of Safari?

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

Extreme, but not acceptable situation and I can't start the work tomorrow morning

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

How old can references or sources in a thesis be?



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 yesterday


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 yesterday


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 yesterday


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 yesterday


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

                      Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                      Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                      Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form