Migrate MySQL and ERPNext when bench command doesn't work

I think the [site.local] part should probably be site.local (no square brackets)

I’m getting there below.

erpman@localhost:~/frappe-bench$ mysql -u root -p 1bd3e0294da19198 < databases-one.sql;
Enter password:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '

I think the system is reading in the DBname(1bd3e0294da19198) as the password.
Import the database by executing the following command:

mysql -u root -p PASSWORD_HERE 1bd3e0294da19198 < databases-one.sql;

Actually that’s not the case.

I run mysql -u root -p 1bd3e0294da19198 < databases-one.sql;

It asks for the password. The error comes after the entering the password.

My apologies.
Could you perhaps post the first few lines of the sql file?

Alternatively, use a GUI based DB utility like phpmyadmin to assist you with the export/import. HeidiSQL is free and open, and the community version of SQLyog is also

I have ended up using a 2 months earlier than latest backup. It seems it will work but I get this error.

Could not find Default Warehouse: Stores - G

Just create it again, and/or set it to default if it already exists

How is it created?

In the “magic bar”…just type
new warehouse
and you will be prompted for the rest.
or you can use the “warehouse tree”

Is “magic bar” same as command?

the search bar…top centre of your screen

But look what I see at the screen? Anyway am so new to this. Please pardon me.

Updating%20ERP


The “magic bar” is in the top pic here…

No problem that it’s new - we all started out at the beginning like you - welcome to ERPNext!

If this error stays on screen for more than ~10 mins, maybe you should run (again)

bench update

Since the system is not running properly, I can’t seem access the magic bar.
Running bench update produces the similar error. I wish there is a way of creating a warehouse through the command line. That will save the day.

I appreciate your help.

The table in the DB with the data in, is “tabWarehouse” - maybe check it’s content to see if your table contains the right entry

Be warned…this is a very very dangerous thing to do to/with your data, and it could cause total corruption of the DB, so make backups before you try anything like this - which is not guaranteed to fix it, but might help if you are desperate.

The entry would be along the lines of this…

insert into tabWarehouse (
name, creation, modified, modified_by, owner, docstatus, parent, parentfield, parenttype, idx, pin, email_id, disabled, lft, parent_warehouse, mobile_no, city, rgt, _comments, state, _liked_by, company, _assign, is_group, warehouse_name, _user_tags, account, old_parent, phone_no, address_line_2, address_line_1
) values(
‘Back Office - ZZZ’,‘2017-11-09 09:48:19.568403’,‘2017-11-09 09:48:19.643324’,‘trent@murgatroyd.za.net’,‘trent@murgatroyd.za.net’,‘0’,‘Storeroom - ZZZ’,NULL,NULL,‘6’,NULL,NULL,‘0’,‘7’,‘Storeroom - ZZZ’,NULL,NULL,‘8’,NULL,NULL,NULL,‘Company Name’,NULL,‘0’,‘WarehouseName’,NULL,NULL,‘Storeroom - ZZZ’,NULL,NULL,NULL);

You will have to tweak the lft/rgt and indexes to suit your situation. If you are able to access the table on your working system to check its contents, that would be better (as long as both versions are matched and the table structure is the same on both).

By the way, I don’t any working ERP at the moment.
Seems am getting somewhere though.
Now the problem is this
ProgrammingError: (1146, u"Table ‘1bd3e0294da19198.tabWebhook’ doesn’t exist")
You can see the entire error track by visiting e.gagawala.com

Thank you

Although this is NOT the recommended way, it seems to work OK

1 Like

What happens if you execute?
$git add *
$git commit -m “After fixing Patches”
$bench update

All in all thanks for your support. Couldn’t thank you more.

1 Like

I don’t honestly know - but I will try it out :grinning:

1 Like

Just to explain a little.
git add * means you want to add every change you’ve made to the stage.
git commit -m “After fixing patches” means you want to commit the added changes and -m flag is for the message. i.e. After fixing patches. This message can be anything.
However, the system is functional just want to fix permissions so that every user can be able to upload files.