在搞开发时经常会碰到MySQL localhost (10061)解决方法 这种问题,以前我因为打了wind TCP/IP更新补丁(KB967723),出错,今天又不一样了,下面是解决办法,有需要的朋友分析一下。
第一步
删除c:windowns下面的my.ini
第二步
打开c:binwinmysqladmin.exe 输入用户名 和密码
第三步 在dos下 输入 mysqld-nt -remove 删除服务
在接着输入 mysqld-nt -install
第四步 输入mysql 启动成功。
其它可参考的方法:
1.看看hosts文件中localhost是不是指向127.0.0.1
2.如果是没启动mysql服务,则可运行net start mysql。
3.一些相关命令:
mysqld-nt --install #启动Mysql
mysql #运行Mysql
mysql -h ipAddress -u username -p
或者:直接去bin里点mysqld.exe或mysqld-nt.exe,看下它的进程能否正常运行,如不行,再去控制面板,服务里去启动它,看下是什么错误。如果不行,就在添加删除里删去mysql,然后再重装mysql,一般都能解决问题,可以在安装前备份一下DATA。
Error: Can't connect to MySQL server on 'localhost' (10061)
Errno.: 2003
错误编号:2003
问题分析:
无法连接到 MySQL 服务器,可能的情况为:
1、MySQL 服务没有启动,一般是在异常的情况下 MySQL 无法启动导致的,比如无可用的磁盘空间,my.ini 里 MySQL 的 basedir 路径设置错误等;
2、MySQL 服务器资源紧张,导致无法连接。
解决方法:
1、如果你是虚拟主机用户(购买的空间),则联系空间商检查 MySQL 是否正常启动,并确认 MySQL 的配置信息(是否为 localhost);
2、如果你是独立主机用户(拥有管理主机权限),则按下面步骤检查:
1)检查磁盘空间是否还有剩余可用空间,尽量保持有足够的磁盘空间可用。
2)检查 my.ini 里的 basedir (MySQL 安装地址) 和 datadir (数据目录存放地址)等参数设置是否正确,然后重新启动下 MySQL 服务。

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor
