MySQL无法启动、无法停止解决方法(安全设置后容易出现)
最近在Win2003上的MySQL出现过多次正常运行时无法连接数据库故障,根本原因就是因为安全设置以后容易出现的问题,其实很简单的解决
最近在Windows 2003上的MySQL出现过多次正常运行时无法连接数据库故障,现象是无法连接数据库,也无法停止MySQL或重启MYSQL,重启机子也没有效果,由于每次都是草草尝试各种方法搞定即可,一直没有深入研究,下次一定把图和故障现象系统归纳一下。本文先列一下常见的解决方法。一、确认MYSQL已经配置且正确
重新配置
如果是重新安装的MYSQL,请确认安装后的MYSQL经过第一次配置,否则会缺少my.ini文件,配置方法,可以在安装到最后一步时选择,现在开始配置MYSQL,或在程序组中运行MYSQL配置向导。配置完成后,要确保my.ini文件中[mysqld]字段下至少有basedir安装目录路径和datadir数据库路径。
配置之前,如果原来已经有过MySQL配置,可以先在MYSQL向导中进行执行一次REMOVE INSTANCE,然后再重新配置。
覆盖数据表
默认的MYSQL数据库会安装到My Document下,所以如果您的数据库目录在其它路径下,可以先把MYSQL停止掉,然后把数据库剪切到其它路径,然后拷贝相关数据表进入同一目录即可。
如果MYSQL数据表使用不同的账户,还需要在MYSQL创建账户,或直接使用原来的MYSQL数据表覆盖(需确认之前的MSYQL数据表是未损坏的)。
解决无法启动
遇到无法启动MYSQL时常见解决方法:
A、先使用命令C:\Program files\mysql\bin\mysqladmin-u root -p shutdown来关闭MYSQL
B、再在cmd命令行下,执行net start mysql启动mysql。
二、1067错误常见解决方法
故障现象
如果在停止MYSQL(net stop mysql)或启动MYSQL时,出现1067错误,错误信息“MySql 服务正在停止...系统出错(A system error has occurred.)...系统发生 1067 错误(System error 1067 has occurred.),进程意外终止(The process terminated unexpectedly.)”等。
常见解决方法
如果以前一直运行OK的,请先按照上面的“无法启动”解决方法执行一次看看。
如果进行过Remove Instance操作,再次重建时后,一定要检查my.ini文件中的datadir是否已被还原了,如果该地址下数据库不存在,也将报告1067错误,只需要修改成真实的数据库目录地址,然后手动启动即可。
检查MYSQL目录权限
检查my.ini文件中[mysqld]字段下是否有basedir安装目录路径和datadir数据库路径,my.ini可能需要出现在两个地方,MYSQL的安装目录和Windows目录(假设是windows环境)下,都要检查一下。
有时候删除%windir%/my.ini文件然后再重新配置也可以解决,再次配置后检查一下Windir目录下是否有my.ini文件,有时把安装目录下最新的my.ini拷贝过去覆盖一下也能解决问题。
如果是Linux环境,试一下把mysql.server拷贝至/etc/rc.d/init.d/下,然后再运行chkconfig mysql.server,之后就可以在命令行中设置PATH、使用命令执行mysql启动。
三、非法关机造成的MYSQL无法启动问题
如果是因为非法关机等原因导致MYSQL无法启动或启动有问题的,最好使用重新安装的或确认是OK的MYSQL数据表及ibdata1、mysql.pid、ib_logfile0等文件进行覆盖,天缘试过遇到过多次这种情况,就是原来的MYSQL表有问题了,总是无法启动,但是更换成新表就可以。
四、重装MYSQL
发现MYSQL有问题时,最便捷的方法,是先把mysql卸载掉,然后重装重新配置,具体方法如下:
1、卸载MYSQL,清理掉安装目录和Windows目录下的my.ini文件。
2、检查任务管理器中是否还有mysql进程,如果有,可以把mysqld.exe杀掉,或者先杀掉再卸载也可以。
3、在cmd命令窗口,执行:sc delete mysql,该命令是清理注册服务命令。
3. 重装 mysql
如果是以后出现这个问题,可能是因为mysql以低权限运行的时候因为密码策略等问题导致,大家看恶意将mysql的启动用户更下下密码,然后在服务项里设置下即可。
如下图
注意:先到windows管理器中修改下密码

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

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

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











Solutions to print spooler failure to start: 1. Check the error log; 2. Check the driver; 3. Service repair; 4. Check the system log; 5. Reinstall the printing software; 6. Check the printer connection; 7. Windows update; 8 , Check for other software conflicts; 9. Try to run as administrator; 10. Consider other software conflicts; 11. Consider hardware problems; 12. System recovery; 13. Seek professional help. Detailed introduction: 1. View the error log, open the "Event Viewer", view printing-related errors, etc.

Solutions to iis failure to start: 1. Check the integrity of the system files; 2. Check the port occupancy; 3. Start related services; 4. Reset the IIS configuration; 5. Reinstall IIS; 6. Check the event viewer log; 7 , Regular maintenance and updates; 8. Back up important data. Detailed introduction: 1. Check the integrity of the system files, run the system file checking tool, check the integrity of the system files, if you find problems with the system files, you can try to repair or replace the damaged files; 2. Check the port occupancy, in Windows Command prompt method.

Recently, someone encountered the problem of being unable to start when using deepinv20. Every time the computer is turned on and the system is entered, the error code interface as shown in the picture will appear. I don’t know how to solve it. At this time, we can try to switch the kernel or run the Linux command line Add content to solve the problem. What to do if deepinv20 cannot start: Method 1: 1. If we use a new computer, it may not be compatible with the old version of deepin kernel. 2. At this time, we can try to replace the latest system kernel, or directly upgrade the system version to solve the problem. Method 2: 1. Restart the computer and press "F1" during boot to enter the bios settings. 2. Then under the boot option, find “se

There are all sorts of computer problems, but the most alarming one must be the inability to boot. There are so many reasons why your computer won't boot, but the clues are minimal. The only fact we know is: nothing works. As a non-professional repairman, how do you solve the problem of the computer not being able to turn on? To be honest, Xiao Cong cannot answer your question exactly. However, this article provides some common and easy-to-operate methods that can help you find the right idea and troubleshoot when your computer won't turn on. It is recommended to save this article for future reference. The following method works on both desktop computers, laptops, and all Windows systems. Table of Contents: 1. Basic detection (power on, connection problems, etc.) 2. Listen to the prompts (the most orthodox detection method) 3. Basic principles (avoid troubleshooting during maintenance)

If N card users want to set up the graphics card, they need to do it on the Nvidia control panel. However, some users find that their Nvidia control panel cannot be opened. What should they do? Today, the editor will introduce to you the solution to the problem that the Nvidia control panel cannot be started. Users in need can come and try it. Solution to the problem that the Nvidia control panel cannot be opened: 1. Confirm whether the Nvidia graphics card device has been recognized normally. 1. Please go to [Device Manager] - [Display Adapter] - to check whether there is an Nvidia graphics card device. 2. If not, please right-click and select [Scan for hardware changes] to scan again. 2. Please confirm the Nvidia graphics card driver

Reasons why Windows cannot start: 1. Hardware failure; 2. System file damage; 3. Virus infection; 4. Driver problems; 5. Software conflicts. Detailed introduction: 1. Hardware failure is one of the common reasons why Windows cannot start; 2. System file damage is also a common reason why Windows cannot start; 3. Virus infection, malware or virus infection may damage system files or registry , causing Windows to fail to start normally; 4. Driver problems, incompatible or damaged drivers, etc.

Title: Common service failure to start and crash problems in Linux systems and their solutions Abstract: When using a Linux system, the startup and stable operation of services are crucial to the normal operation of the system. However, sometimes we may encounter problems where some services fail to start or crash, causing inconvenience and risk to the system. This article will focus on the common problems of service failure to start and crash in Linux systems, and provide corresponding solutions to help readers quickly solve these problems. Text: 1. Frequently asked questions about service failure to start

How to solve the problem that computer dependent services or groups cannot be started. With the advancement of technology, computers have become one of the indispensable tools in our daily lives. Whether it is work, study or entertainment, it is inseparable from the help of computers. However, in the process of using the computer, we will inevitably encounter various problems, one of which is "the dependent service or group cannot be started." This problem has caused trouble to many people, but in fact, as long as you master the correct solution, you can solve this problem quickly. First, understand what "dependent service or group" means. In a computer, there are
