ERROR 1049 (42000): unknown database, localized Wordpress database

I am moving my Wordpress site to a local site for testing.

I encountered the error below when I try to import .sql, which I export from CPanel PHPMyadmin to a local MYSQL Workbench.

FYI, I am using MYSQL Workbench 6.0 and MYSQL Administrator 1.2.17

15:08:07 Restoring C:\Users\abc\Desktop\db.sql

Running: mysql.exe --defaults-extra-file="c:\users\abc\appdata\local\temp\3\tmpdemide.cnf"  --host=localhost --user=root --port=3307 --default-character-set=utf8 --comments --database=db < "C:\\Users\\abc\\Desktop\\db.sql"

ERROR 1049 (42000): Unknown database 'db'

Operation failed with exitcode 1
15:08:08 Import of C:\Users\abc\Desktop\db.sql has finished with 1 errors
+4
source share
2 answers

Obviously, the export was performed without specifying the database (schema), so you must first create it manually before you can import the dump. MySQL Workbench allows you to import a dump into another (including new) scheme. You can specify this on the import page:

enter image description here

+3

,

CREATE DATABASE db;

sql.

+2

All Articles