MySQL localhost (10061)解决方法
在搞开发时经常会碰到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 服务。

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

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

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]

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

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

MySQL supports four index types: B-Tree, Hash, Full-text, and Spatial. 1.B-Tree index is suitable for equal value search, range query and sorting. 2. Hash index is suitable for equal value searches, but does not support range query and sorting. 3. Full-text index is used for full-text search and is suitable for processing large amounts of text data. 4. Spatial index is used for geospatial data query and is suitable for GIS applications.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.
