Tried importing a small .sql
file (~5MB) via cmd
. Within a few seconds the import returns as if it was successful (no errors or warnings), however, when I refresh the schema in workbench or check contents of the folder representation of the schema, the schema appears to be empty.
This is the command I used:
mysql -hlocalhost -uroot -ppassword db_name
< C:\sql_input_path\db.sql > C:\error_log_output_path\error.txt
In addition, I tried importing the .sql
file using the Workbench import tool, which also shows successful, but nothing seems to be reflected in the actual schema after a refresh.
Any ideas why this is and how to correct this? I have been trying to figure this out for quite some time.
thanks in advance!
show processlist
command doesn't seem to suggest that MySQL is importing anything during the import andshow tables
returns no results after the import. – Onegadb.sql
file, ifuse db_name
is included with a differentdb_name
than what you are expecting. – Smithsoniteuse dbname
is automatically generated with the dump. When you specify a DB name in the cmd import command, it should override theuse dbname
that is within the.sql
file. – Onegadb
specified at command line overrides the one specified in file? If yes, my answer isNO
. – Smithsonite.sql
file? The file I need to import is 40GB+ in size so I cannot open it with a text editor to edit the default schema. – Onegause db
command included. No other option. – SmithsoniteSQLYog
,MySQL Workbench
for exporting data into ansql
file. You can instruct but optionally, to includeuse database
statement in the dump file. – Smithsonite