Mysql数据,不能写入,请教高手指点!
生成的错误日志如下:080527 15:27:29  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
080527 15:27:30  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080527 15:27:30  InnoDB: Error: Write to file ./ibdata1 failed at offset 0 0.
InnoDB: 8388608 bytes should have been written, only 5079040 were written.
InnoDB: Operating system error number 22.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: See also section 13.2 at http://www.innodb.com/ibman.html
InnoDB: about operating system error numbers.
InnoDB: Error in creating ./ibdata1: probably out of disk space
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
080527 15:27:30  Can't init databases
080527 15:27:30  Aborting080527 15:27:30  /usr/local/mysql-standard-5.0.0-alpha-pc-linux-i686/bin/mysqld: Shutdown Complete080527 15:27:30  mysqld ended080527 15:42:16  mysqld started
/usr/local/mysql-standard-5.0.0-alpha-pc-linux-i686/bin/mysqld: Error writing file './www-bin.000002' (Errcode: 28)
080527 15:42:16  Could not use www-bin for logging (error 28). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 256 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
080527 15:42:17  Can't init databases
080527 15:42:17  Aborting

解决方案 »

  1.   

    inner db 类型的数据库数据存在ibdata1中,用正确的路径指示ibdata1存在的地方
    打开/etc/my.cnf
    #innodb_data_home_dir = /usr/local/mysql/var/   # 如果innodb_data_home_dir = 为空,可以为表空间文件指定绝对路径
    #innodb_data_file_path = ibdata1:10M:autoextend    #ibdata1为inodb表空间,存放innodb表数据和索引,初始值为10M,autoextend默认自动每次扩展8M表空间
    # 多个表空间文件的情形,配置如下:
    #innodb_data_home_dir =
    #innodb_data_file_path=/ibdata/ibdata1:2000M;/dr2/ibdata/ibdata2:2000M:autoextend#设置表空间最大尺寸:
    # innodb_data_file_path=ibdata1:10M:autoextend:max:500M
    #innodb_log_group_home_dir = /usr/local/mysql/var/
    #innodb_log_arch_dir = /usr/local/mysql/var/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M    #InnoDB用来缓存它的数据和索引的内存缓冲区的大小。你把这个值设得越高,#访问表中数据需要得磁盘I/O越少。在一个专用的数据库服务器上,你可以设置这个参数达机器物理内存大小的80%。#尽管如此,还是不要把它设置得太大,因为对物理内存的竞争可能在操作系统上导致内存调度
    #innodb_additional_mem_pool_size = 2M   s#InnoDB用来存储数据目录信息&内部数据结构的内存池大小。表越多,#你需要在这里分配越多的内存。如果InnoDB用光了这个池内的内存,InnoDB开始从操作系统分配内存,并且往MySQL#错误日志写警告信息。默认值是1MB。
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M    #在导入数据库后,不能更改此参数,更改此参数为不同的值会引起MySQL无法启#动。正确操作步骤:在导入数据库之前,先调节好此参数。
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50
      

  2.   

    So obvious.
    Pay attention to the red words as follows.
    InnoDB: 8388608 bytes should have been written, only 5079040 were written. 
    InnoDB: Operating system error number 22. 
    InnoDB: Check that your OS and file system support files of this size. 
    InnoDB: Check also that the disk is not full or a disk quota exceeded. 
      

  3.   

    你有没有修改什么参数,移动什么文件,或者修改了ibdata文件的访问权限?