search
HomeDatabaseMysql Tutorial关于wampserver无法启动mysql数据库的问题

最近做网站项目,昨天准备做一个留言板。为了图方便,在网上看到了PHPCMS v9用导向可以自动生成留言板的模块的方法,于是准备下下来偷个懒。待安装完毕后一瞧见了右下角的wampserver绿色图标变成了橘黄色。退出后重启wampserver发现已然无法正常启动,图标始

最近做网站项目,昨天准备做一个留言板。为了图方便,在网上看到了PHPCMS v9用导向可以自动生成留言板的模块的方法,于是准备下下来偷个懒。待安装完毕后一眼瞧见了右下角的wampserver绿色图标变成了橘黄色。退出后重启wampserver发现已然无法正常启动,图标始终停在橘黄色不变。在wampserver上打开phpmyadmin,输入密码,提示#2002 无法登陆mysql服务器。我意识到出问题了。应该是刚才安装的PHPCMS v9的apache或者mysql和wampserver里面的服务器冲突了。(怪不得刚才安装的时候360一直提示在修改系统文件,要不要阻止此程序。)于是开始了解决问题之路。

首先将刚才装的PHPCMS V9 文件全部删除。一般来讲wampserver变为橘黄色可能是apache或者是mysql服务器没法正常启动而造成的。第一步先检查apache服务器。在wampserver上运行测试80端口,控制台显示"your port 80 is actually used by : server:apache 2.4.4/mysql5.6.12"。与我本身wampserver集成环境的版本相同,说明80端口正在被自身所占用。然后  "开始->cmd",输入 netstat -ano 显示当前端口连接情况。80端口正被PID为564的活动所使用。然后再控制台继续输入 :  tasklist  寻找PID为564的映像名称 是httpd.exe 程序。而httpd.exe正是apache相关程序。在地址栏输入 http://127.0.0.1:80   也打开了wampserver对应www目录下的文件。以上说明apache正常启动了。

接下来就断定是mysql除了问题,除了登录phpmyadmin报错“#2002 无法登陆mysql服务器”之外。点开wampserver的mysql,只有"启动/继续服务",“安装服务”,“卸载服务”可以使用。明显mysql没启动,于是点击“启动/继续服务”,此时“启动/继续服务”和“停止服务”都可以使用。很奇怪,正常启动后“启动/继续服务”就不能使用了。过了一会儿,继续查看mysql->service,发现又只有“启动/继续服务”,“安装服务”,“卸载服务”可用。如果勉强说刚才mysql服务启动了的话现在mysql服务是真的自己停掉了。于是查看3306端口。用刚才的方法,控制台输入: netstat -ano  发现3306端口没有被活动连接使用。打开控制面板->管理工具->服务。找到wampmysqld 服务,右键启动此服务,报错:“windowswufa 启动wampsqld服务,错误1067 :进程意外终止”。mysql根本没法启动。于是开始百度,一条一条浏览。找了很多解决办法。如删除注册表中位于HKEY_LOCAL_MECHINE\SYSTEM\ControlSet001和HKEY_LOCAL_MECHINE\SYSTEM\ControlSet002以及HKEY_LOCAL_MECHINE\SYSTEM\CurrentControlSet 下的和mysql相关文件。打开注册表搜索mysql,找到相关文件,全部删除。退出重启wampserver。依然无法正常启动。或者打开防火墙,或者将phpmyadmin\libraries下的config.default.php中的$cfg['Servers'][$i]['host']="localhost" 改为$cfg['Servers'][$i]['host']="127.0.0.1";改过之后依然不行。于是改换google,找了几篇博客,终于找到了和我问题差不多的一个人。他的方法是删掉位于c盘下windows下的my.ini文件。照着他的方法做了,大功告成,wampserver终于正常启动了。

打开这个my.ini文件, 基本上是关于刚才那个PHPCMS v9中mysql的配置文件。我猜想大概是和wampserver中的mysql冲突了。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What are some tools you can use to monitor MySQL performance?What are some tools you can use to monitor MySQL performance?Apr 23, 2025 am 12:21 AM

How to effectively monitor MySQL performance? Use tools such as mysqladmin, SHOWGLOBALSTATUS, PerconaMonitoring and Management (PMM), and MySQL EnterpriseMonitor. 1. Use mysqladmin to view the number of connections. 2. Use SHOWGLOBALSTATUS to view the query number. 3.PMM provides detailed performance data and graphical interface. 4.MySQLEnterpriseMonitor provides rich monitoring functions and alarm mechanisms.

How does MySQL differ from SQL Server?How does MySQL differ from SQL Server?Apr 23, 2025 am 12:20 AM

The difference between MySQL and SQLServer is: 1) MySQL is open source and suitable for web and embedded systems, 2) SQLServer is a commercial product of Microsoft and is suitable for enterprise-level applications. There are significant differences between the two in storage engine, performance optimization and application scenarios. When choosing, you need to consider project size and future scalability.

In what scenarios might you choose SQL Server over MySQL?In what scenarios might you choose SQL Server over MySQL?Apr 23, 2025 am 12:20 AM

In enterprise-level application scenarios that require high availability, advanced security and good integration, SQLServer should be chosen instead of MySQL. 1) SQLServer provides enterprise-level features such as high availability and advanced security. 2) It is closely integrated with Microsoft ecosystems such as VisualStudio and PowerBI. 3) SQLServer performs excellent in performance optimization and supports memory-optimized tables and column storage indexes.

How does MySQL handle character sets and collations?How does MySQL handle character sets and collations?Apr 23, 2025 am 12:19 AM

MySQLmanagescharactersetsandcollationsbyusingUTF-8asthedefault,allowingconfigurationatdatabase,table,andcolumnlevels,andrequiringcarefulalignmenttoavoidmismatches.1)Setdefaultcharactersetandcollationforadatabase.2)Configurecharactersetandcollationfor

What are triggers in MySQL?What are triggers in MySQL?Apr 23, 2025 am 12:11 AM

A MySQL trigger is an automatically executed stored procedure associated with a table that is used to perform a series of operations when a specific data operation is performed. 1) Trigger definition and function: used for data verification, logging, etc. 2) Working principle: It is divided into BEFORE and AFTER, and supports row-level triggering. 3) Example of use: Can be used to record salary changes or update inventory. 4) Debugging skills: Use SHOWTRIGGERS and SHOWCREATETRIGGER commands. 5) Performance optimization: Avoid complex operations, use indexes, and manage transactions.

How do you create and manage user accounts in MySQL?How do you create and manage user accounts in MySQL?Apr 22, 2025 pm 06:05 PM

The steps to create and manage user accounts in MySQL are as follows: 1. Create a user: Use CREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password'; 2. Assign permissions: Use GRANTSELECT, INSERT, UPDATEONmydatabase.TO'newuser'@'localhost'; 3. Fix permission error: Use REVOKEALLPRIVILEGESONmydatabase.FROM'newuser'@'localhost'; then reassign permissions; 4. Optimization permissions: Use SHOWGRA

How does MySQL differ from Oracle?How does MySQL differ from Oracle?Apr 22, 2025 pm 05:57 PM

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

What are the disadvantages of using MySQL compared to other relational databases?What are the disadvantages of using MySQL compared to other relational databases?Apr 22, 2025 pm 05:49 PM

The disadvantages of MySQL compared to other relational databases include: 1. Performance issues: You may encounter bottlenecks when processing large-scale data, and PostgreSQL performs better in complex queries and big data processing. 2. Scalability: The horizontal scaling ability is not as good as Google Spanner and Amazon Aurora. 3. Functional limitations: Not as good as PostgreSQL and Oracle in advanced functions, some functions require more custom code and maintenance.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MantisBT

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.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

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.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools