Home Database Mysql Tutorial 关于wampserver无法启动mysql数据库的问题

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

Jun 07, 2016 pm 03:46 PM
mysql about start up database

最近做网站项目,昨天准备做一个留言板。为了图方便,在网上看到了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 of this Website
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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

How to connect to the database of apache How to connect to the database of apache Apr 13, 2025 pm 01:03 PM

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Laravel Introduction Example Laravel Introduction Example Apr 18, 2025 pm 12:45 PM

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

How to install mysql in centos7 How to install mysql in centos7 Apr 14, 2025 pm 08:30 PM

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

See all articles