Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 1305 when importing sql dump into mySQL Workbench

I am importing a sql dump file into MySQL workbench and keep getting the error below. Does this mean the rest of the file/records did not import or only the xxx.getRates portion did not? Will I be missing records from it? Does anyone know what might be causing this?

01:29:31 Restoring D:\Projects\CustomerName\Customer Files\xxx-2016-Oct-03.sql Running: mysql.exe --defaults-file="c:\users\admini~1\appdata\local\temp\2\tmpru2fjn.cnf" --protocol=tcp --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments --database=xxx < "D:\Projects\CustomerName\Customer Files\xxx-2016-Oct-03.sql

ERROR 1305 (42000) at line 33522: FUNCTION xxx.getRates does not exist

Operation failed with exitcode 1 01:34:29 Import of D:\Projects\CustomerName\Customer Files\xxx-2016-Oct-03.sql has finished with 1 errors

like image 447
walison1307 Avatar asked Jan 12 '17 01:01

walison1307


People also ask

How do I import a dump into MySQL workbench?

Load a MySQL dump from MySQL WorkbenchConnect to your MySQL database. Click Server on the main tool bar. Select Data Import. You should see a link to the default dump folder, typically your Documents folder in a subfolder titled dumps .

What is Dumpfile in MySQL?

INTO DUMPFILE is a SELECT clause which writes the resultset into a single unformatted row, without any separators, in a file. The results will not be returned to the client. file_path can be an absolute path, or a relative path starting from the data directory.

How do you load data into Workbench?

Importing CSV file using MySQL Workbench The following are steps that you want to import data into a table: Open table to which the data is loaded. Review the data, click Apply button. MySQL workbench will display a dialog “Apply SQL Script to Database”, click Apply button to insert data into the table.


1 Answers

When using mysqldump, you must explicitly ask for Stored routines to be dumped. The option is --routines if you are running it manually. If you are running it through some app (Workbench), then look for its mechanism:

[ ] Dump Stored Procedures and Functions
[ ] Dump Events
[ ] Dump Triggers
like image 199
Rick James Avatar answered Oct 11 '22 22:10

Rick James