Error importing database

I’m trying to manually import a site, but when I open the site shell and enter the string to import the database, I get- “Can’t connect to MySQL server on ‘localhost’ (10061)'” error. The database is in the correct location according to the documentation. I do not have MySQL installed on my computer, but assumed that is part of local, no?

System Details

  • **Local Version: 8.2.0+6554

Windows 10

Hi @mcaravaglia

There might be something else blocking or interrupting Local here.

Do you have any antivirus, security, or firewall applications that could be blocking Local?

Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.

Can you share your Local Logs with us if you’re still having trouble? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

Thanks for responding Nick. I have no other services running besides Norton anti virus. I I’ll disable and try again. I’ll also download the logs and post them. Question tho, do i need MySQL installed on my computer, or is it included in the Local App?

No you don’t need your own instance of MySQL all of that will be inside of Local! Keep us posted and we’d be happy to help further!

local-logs.zip (5.2 KB)

Hello. As requested, please find Local Logs. I also disabled the Norton anti-virus/firewall but that had no affect. Please note below errors. The first error is what I get in the shell if I name the .sql file without the .sql extension and the 2nd error is what I get if I add the .sql extension to the file name. Not sure it has any bearing on the issue, but thought I’d put it out there.

Named without .sql extension:
Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

Named with .sql extension:
Error: Import file missing or not readable: carvedinblue.sql

Hi @mcaravaglia

To clarify you’re utilizing the steps from our help doc here on manually importing?

Yes. Following to the letter. It doesn’t seem to be seeing the .sql file(?)

Just to confirm can you create a new, blank site in Local and access that okay? Or do you get any kind of errors or warnings?

Where did this SQL file originate? Is the site currently hosted somewhere? Do you have a wp-content for the site as well?

I’ll try a new, blank site.

The website is privately hosted. I exported the database through MyPhpAdmin. I then downloaded the wp-content folder using FileZilla with ftp connection.

Nick,
No further thoughts on this, or am I S.O.L. and need to find a different solution?

Hi @mcaravaglia

Were you able to test if you could create new Local sites and access those okay?

What happened when you tried the manual import steps I provided? Did you get a different type of error?

I’ve made 6 local sites prior with no problem. This one I’m trying manually and it just doesn’t recognize the database. Makes no sense.

So on a new blank site, after you do these steps:

  • Copy the correct SQL file to the site root (App>Public).
  • Within Local, click Open Site Shell
  • Import your Database with wp db import your-database-filename.sql

What happens? Can you send a screenshot?

Nick,
I got this working. I needed to create an importable version of the website. All’s good. Thanks.

1 Like

Sounds good @mcaravaglia glad you got it working and thank you for the follow up!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.