---
title: "Mysql安装及Navicat 1045错误解决方案 "
author: "lliu26"
date: "2012-11-30T15:44:38Z"
tags: ["1045", "3306", "MySQL", "navicat"]
categories: ["数据库"]
slug: "mysql-navicat-1045"
draft: false
lastmod: "2012-11-30T15:44:38Z"
id: 1738976
url: "https://lliu26.iteye.com/blog/1738976"
---

1.Mysql安装1045错误的解决方案

Error number 1045:
Access denied for user 'root'@'localhost'(using password:NO)
![](http://dl.iteye.com/upload/attachment/0077/2577/c7d25098-a318-37d2-8411-1b4d17a673d3.png)


系统3306端口被占用，找到相应进程并kill掉，然后按retry。

Windows中查看端口状态及占用进程状态命令：
netstat -aon

找到3306所有的pid ,然后在任务管理器中杀掉。

2.启动Navicat出现1045错误的解决方案
Error number 1045:
Access denied for user 'root'@'localhost'(using password:YES)

(1).重新安装MySQL并删除所有mysql相应文件；
(2).设置防火墙例外：控制面板->Windows防火墙->例外
(3).添加例外：名字->mysql 端口->3306 TCP协议 确定