标签:错误

浏览模式: 标准 | 列表 | 图文
MySQL的1067错误解决方案大全

MySQL的1067错误解决方案大全

本文乃是从google搜索而来,缘由是有群友问,1067怎么处理。。。
于是google了一下,因为我记得好象是没有指定default_file。。
结果,发现1067错误有这么多的原因啊?来源于:http://www.wzsky.net/html/Program/Mysql/100436.html

原文如下:

本文例举了MySQL的1067错误的多种解决方法,以便大家遇到该错误时可以快速参考解决。

内容:
*************
1

安装MYSQL后更改了ROOT的密码后用
net startmysql
启动时我就遇到了这样的问题.使用以下命令后
c:\mysql\bin\mysqladmin-u root -p shutdown
再net start mysql就没有这个错误提示了!


*************
2
MySQL的1067错误


Q:我的Mysql碰到了 1067 错误

错误信息为:
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.

A:在我的机上的解决办法是:
修改%windir%\my.ini,增加
[mysqld]
#设置basedir指向mysql的安装路径
basedir=D:\Program\Tools\mysql
datadir=D:\Program\Tools\mysql\data


*************
3
已经弄好了!!!
好像是这样……
mysql_install_db 脚本只是在初次安装时才需要运行一次,之后就不用再运行了,不知道是不是这么回事.我把mysql.server拷贝至/etc/rc.d/init.d /中,运行chkconfig mysql.server,至此mysql服务器每次开机自动启动,只要设置好PATH,在命令行上输入mysql就一切搞定!
看来摸索的过程实在是痛苦啊,这已经折磨我好几天了……

*************
4

问:我的Mysql碰到了 1067 错误

错误信息为:

A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.

答:
解决办法:

1.检查你的Mysql目录有没有给系统的System用户权限。
2.删除掉你的 %WINDOWS%/my.ini 文件。
3.检查你的 c:/my.cnf 文件配置是否正确。


*************
5

【☆☆☆ MySql概要说明 ☆☆☆】
MySql 的默认安装目录是c:mysql,安装结束后没有任何提示信息说安装结束,请点Finish按钮之类的话,直接就退出了。如果需要安装到其他目录,建议先 安装到c:mysql,然后再整个目录move到自己希望的地方,例如移动到d:mysql 之后,需要编辑 d:mysqlmy-example.cnf (*.cnf的文件在Windows 2000中会被注册成为 SpeedDial文件,在资源管理器中无法操作,要用命令行来启动notepad编辑,例如运行notepadd:mysqlmy- example.cnf ,但是这个文件是UNIX系统下的文本文件格式,在notepad中不能正确换行,可以用write打开编辑,
或者用write打开后保存一次,再用notepad就可以编辑了。)找到basedir一行,去掉前面的“#”号注释,将后面的路径改为移动后的目录(目录分隔符要用斜线而不是反斜线),然后另存为:c:my.cnf
用服务方式启动的MySql如果用 net stop mysql 来停止,会得到一条 出错消息,例如:
C:>net stop mysql
MySql 服务正在停止.
系统出错。
系统发生 1067 错误。
进程意外终止。
MySql 服务已成功停止。
这没有关系,MySql确实已经停止了。但是假如不希望看到任何出错消息
的话,可以用以下的命令来停止:
C:>mysqlbinmysqladmin -u root shutdown
如果没有任何提示信息,说明MySql已经成功停止了。
需要说明的是MySql虽然号称安装简单,易于使用,但是这毕竟是基于SQL的数据库管理系统,所以如果不是对SQL十分精通的话恐怕也不能拿它来做什么

**************
6

mysql服务无法启动的解决方法
mysql服务无法启动

我的操作系统是 win xp
无论安装何版本的mysql,在管理工具的服务中启动mysql服务时都会在中途报错
内容为:在 本地计算机 无法启动mysql服务 错误1067:进程意外中止

经过多方求教,得解决方法如下

查找系统(后来验证应该为windows目录)目录下的my.ini文件,编辑内容(如果没有该文件,则新建一个),至少包含basedir,datadir这两个基本的配置。
[mysqld]
# set basedir to installation path, e.g., c:/mysql
# 设置为MYSQL的安装目录
basedir=D:/www/WebServer/MySQL
# set datadir to location of data directory,
# e.g., c:/mysql/data or d:/mydata/data
# 设置为MYSQL的数据目录
datadir=D:/www/WebServer/MySQL/data

另外,要主意
[WinMySQLadmin]
Server=D:/www/WebServer/MySQL/bin/mysqld-nt.exe
user=root
password=xxxxxxxx
#以上是设置WinMySQLadmin的配置
[Client]
user=root
password=xxxxxxxx

hehe~ 解决了


**************
7
刚刚弄好Mysql 『关键字 1067错误』
比较郁闷,竟然没有想到安装个Mysql也会出错,错误代码是1067 安装卸载了好几次,就是不行,而且把一些禁用了的服务都打开了,但是还是不行。最后我是这样解决的:

在C:\windows里找一找my.ini 然后删除 然后再启动winmysqladmin.exe界面配置mysql,保存my.ini就可以了 启动mysql试试 呵呵



***************
8
mysql 错误 1067: 进程意外终止
这 个问题困扰了一个早晨,非常郁闷!以前我在装mysql的时候从来没有遇到过,可是现在庄这个高版本的就有问题了,我换我装过的低版本的还是一样的问题 (最关键的是操作系统都是一样的)。在windows2000的服务里面启动mysql服务可是总是弹出“错误 1067: 进程意外终止”!

我 感觉问题在配置文件,于是就重新写了my.ini,启动还是一样的效果,我在google上查找无果,崩溃状态!就在此时眼前一亮,一位高人的指点是我豁 然开朗,你的ini文件有否放到windows目录下,我从个人目录的windows目录下,将其拷贝到系统windows目录下,启动服务,ok!!!

PHP常见错误的翻译(一)

PHP常见错误的翻译(一)

Common PHP Errors
常见PHP错误
December 7, 2007 - 10:44 pm | Nessa (来源,忘了从哪个网站COPY的了)
I’m going back to the basics here, you know, when you wrote your first PHP script and saw an ugly-ass error message pop up on your screen? Error messages are the best tool a programmer has.
我又回到最基础的上面来了,你知道,当你在最初写PHP代码时,你是否经常看到那些可恨(我翻译成可恨了)的出错信息?其实,出错信息对一个程序员来说是一个最好的工具。

Set up Error Reporting
设置出错报告

Most PHP errors are straight forward, but there are times where you don’t see any which makes it very difficult to tell what the problem is.
大多数PHP的错误信息都比较直观,但有时你看到的错误信息却很难明确的告诉你问题在哪里。

The first step of PHP troubleshooting is to turn error reporting on. For security reasons you’ll want error reporting off by default, but if something goes wrong you’ll need the information for debugging. You can usually enable error reporting by adding this line to the problem script:
首先你得打开你的 PHP出错报告。从安全角度来说,你可能会想到关闭它。但是如果程序出了问题,而你又需要debug的时候,你可以通过以下的PHP代码临时来打开出错信息。

<?php error_reporting(E_ALL) ?>

Or you can add these lines to the root .htaccess:
或者,你可以将以下几行加入到.htaccess文件里

php_flag display_errors on
php_value error_reporting 6143

This will usually display an error useful for troubleshooting, that is, if the software and your server configuration allows it.
如果软件或者服务器支持,这可以显示一些有用的错误信息

例如:
Parse Errors
解析错误
Parse error: parse error, unexpected T_STRING in……
This is a syntax error. Perhaps you forgot a semi-colon at the end of a line, or you forgot a double quote (”) or an end bracket (}) after you started one. For quote and semicolon issues, the problem is usually the line above the one reported in the error. For brackets, it may be at the end of the script.
这是一个语法构造错误。(这段翻译我想不出怎么好,自己根据理解翻译)出现这段信息的时候,往往都在出错代码的上一行,请检查一下代码的结束,是否双引号或者大括号不匹配,有时候也会有一些字符串的问题在里面。

Parse error: syntax error, unexpected $end in
You’re most likely missing a } somewhere. Make sure that each { you have is also closed with a }.
这东西是忘记了“}”,请检查“{}”是否一一对应了。

Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in..
There may be double quotes within double quotes. They either need to be escaped or brought to single quotes. It’s also possible that a new PHP statement was started before the previous was finished.
出现这种问题往往是在双引号中又有了双引号,可能需要在双引号前加上转义符或者使用单引号。通常问题在显示的行数之上一行。

Header Errors
头出输出错误

Warning: Cannot add header information - headers already sent by (output started at /home/vnessa5/www/errors.php:9) in….
Warning: Cannot send session cache limiter - headers already sent in somefile.php on line 222

Naturally, HTML will parse before PHP. The script is trying to send header information after you’ve already sent output to the browser. HTTP headers are required to be sent before any output from your script, which means that a header function must be placed before any html or even a white space. There are two solutions for this. Either (1) Set the header tags the top of the document, or (2) insert a header redirect by adding this to the very top of the page to force the output buffer:
一般情况下,HTML的解析都会在PHP前面,而代码尝试在发送header相关信息时,你已经有了HTML输出。所以你在发现有这种情况出现的时候,请检查你的代码以保证没有HTML代码或者甚至是一个空格。一般有两个解决方案。1)在文件头部设定HEADER标签。2)在你要输出的页面前插入HEADER标签的内容。

<?php ob_start();

Then this at the very end of the page (not usually required)

ob_end_flush(); ?>