这个mysql使用了2年多了,今天我修改了max_connections=3000,之后,我重启mysql,重启失败,后来我在任务管理器里面直接kill掉进程,然后从服务里面启动,但是还是连不上mysql,报告一个常见的错误
Can't connect to MySql server on 'localhost',现在公司的系统都断掉了,快疯了啊,谢谢各位帮忙

解决方案 »

  1.   

    检查本机mysqld 是否在运行?什么操作系统?有没有先把 max_connections=3000 改回去?
      

  2.   

    我改回去了啊,还是不行的,是windows 2003 server系统,
      

  3.   

    看一下MYSQL的错误日志中有什么信息?另外请问答: "
    检查本机mysqld 是否在运行?" 
      

  4.   

    可以的,我在服务里可以启动mysql服务,可以看到mysqld-nt.exe进程,但是还是连不上啊
      

  5.   

    另外请问如何查看错误日志啊,可不可以把data文件夹拷出来,然后重装啊,谢谢楼上的朋友
      

  6.   

    在任务管理器中可以看到 mysqld-nt.exe 在运行,说明mysql服务已经启来了。然后到你的datadir对应的目录下,你的my.ini文件中有这个参数的定义。找文件扩展名为 .err的文件,用记事本打开。
      

  7.   

    找到一个叫champsysweb.err文本文件,有以下内容,是最新的啊
    090618 13:04:00 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 87031808 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    090618 13:08:24 [ERROR] Default storage engine (InnoDB) is not available
    090618 13:08:24 [ERROR] Aborting090618 13:08:24 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 87031808 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    090618 13:09:58 [ERROR] Default storage engine (InnoDB) is not available
    090618 13:09:58 [ERROR] Aborting090618 13:09:58 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 87031808 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    090618 13:10:34 [ERROR] Default storage engine (InnoDB) is not available
    090618 13:10:34 [ERROR] Aborting090618 13:10:34 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 87031808 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    090618 13:10:39 [ERROR] Default storage engine (InnoDB) is not available
    090618 13:10:39 [ERROR] Aborting090618 13:10:39 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete
      

  8.   

    InnoDB: Error: log file .\ib_logfile0 is of different size 0 87031808 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    090618 13:10:39 [ERROR] Default storage engine (InnoDB) is not available
    你的服务中的命令是什么?检查一下MYSQL服务中命令带的参数。 
    你的cnf 文件中的ib_logfile0尺寸与实际不符,确认你没有用错 my.cnf 文件。
      

  9.   

    C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" MySQL这个就是我服务里面的参数啊,没错吧
      

  10.   

    我在服务里面关掉mysql时,会很慢,而且到了最后会提示一个错误
    Conld not stop the mysql servise on Local Computer
    Error 1053:The service did not respond
    to the start or control request in a timely fashion
      

  11.   

    "C:\Program Files\MySQL\MySQL Server 5.0\my.ini"中找到 ibdata1, ib_logfile0 的那一行,看一下内容是什么?另外操作系统中看一下ib_logfile0, ib_logfile1 的文件大小是多少?
      

  12.   

    这是我my.ini文件里的内容,我把注释都去掉了,好像没找到你说的ibdata1,[client]port=3306[mysql]#default-character-set=latin1
    default-character-set=utf8[mysqld]# The TCP/IP Port the MySQL Server will listen on
    port=3306
    basedir="C:/Program Files/MySQL/MySQL Server 5.0/"datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"
    default-character-set=utf8wait_timeout=28800# The default storage engine that will be used when create new tables when
    default-storage-engine=INNODB# Set the SQL mode to strict
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"max_connections=300query_cache_size=0table_cache=256tmp_table_size=52M
    thread_cache_size=8myisam_max_sort_file_size=100Gmyisam_max_extra_sort_file_size=100Gmyisam_sort_buffer_size=103Mkey_buffer_size=85Mread_buffer_size=64K
    read_rnd_buffer_size=256Ksort_buffer_size=256Kinnodb_additional_mem_pool_size=3469Kinnodb_flush_log_at_trx_commit=1innodb_log_buffer_size=2Minnodb_buffer_pool_size=165Minnodb_log_file_size=83Minnodb_thread_concurrency=8log-bin=localhost
    log-slow-queries=localhost-slow
    long_query_time=2
      

  13.   

    我data目录里面有两个ib_logfile0 84992KB ib_logfile1  84992KB,还有一个ibdata 190464KB
    另外还好多localhost.000001,都很大,大小都不等
      

  14.   

    这样,先把你的 Data 目录做个备份,然后直接删除 ib_logfile0, ib_logfile1 这两个文件,再启你的mysql,应该就可以了。
      

  15.   

    想起来了,可能是我改了这行,之前不是这个,哎不管是不是了,先去吃饭了
    default-storage-engine=MyISAM