I ever got this problem before, then made that working by taking Instance pipe name of SQL Server localdb instance as the Host of Navicat connection profile.
In long words:
Launch windows command prompt as administrator, run below command to check out Instance pipe name of SQL Server localdb instance(e.g. for instance MSSQLLocalDB):
sqllocaldb i MSSQLLocalDB
This outputs:
C:\Users\Administrator>sqllocaldb i MSSQLLocalDB
Name: MSSQLLocalDB
Version: 13.1.4001.0
Shared name:
Owner: ***\Administrator
Auto-create: Yes
State: Running
Last start time: 2020/7/1 22:06:21
Instance pipe name: np:\\.\pipe\LOCALDB#C2923FEA\tsql\query
Here np:\.\pipe\LOCALDB#C2923FEA\tsql\query is the Instance pipe name, fill it to the Host field of Navicat connection profile, and fill other fields as I want. Then it worked for me.
Of cause you should start the SQL Server localdb instance at first, it won't be started by Navicat automatically. Here is the command as someone needs.
sqllocaldb s MSSQLLocalDB
And, Instance pipe name will change on localdb instance restarting, you should keep Navicat connection profile updated.