日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql不能创建innodb类型表_MYSQL have_innodb DISABLED无法创建innodb类型的表

發布時間:2023/12/20 数据库 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql不能创建innodb类型表_MYSQL have_innodb DISABLED无法创建innodb类型的表 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

今天在一臺MYSQL服務器上發現,明明用了engine=innodb創建的表,結果創建出來卻成了myisam的表。再看show variables like '%innodb%';

have_innodb 成了DISABLED。經過一番試驗,發現是我關閉數據庫后,直接刪除ibdata1文件造成的。刪除該文件以后,重啟數據庫,日志文件中會有:

060330 17:22:07 mysqld started

InnoDB: The first specified data file ./ibdata1 did not exist:

InnoDB: a new database to be created!

060330 17:22:07 InnoDB: Setting file ./ibdata1 size to 10 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Error: all log files must be created at the same time.

InnoDB: All log files must be created also in database creation.InnoDB: If you want bigger or smaller log files, shut down the

InnoDB: database and make sure there were no errors in shutdown.

InnoDB: Then delete the existing log files. Edit the .cnf file

InnoDB: and start the database again.

060330 17:22:07 [Note] /usr/sbin/mysqld: ready for connections.

Version: '5.0.19-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)

060330 17:22:26 [Note] /usr/sbin/mysqld: Normal shutdown

看來只刪除ibdata1文件是不行的,于是再度關閉數據庫,把ibdata1和ib_logfile1、ib_logfile0統統刪除,再啟動,

have_innodb 就變成Yes了。

mysq install :

./configure --prefix=/usr/local/mysql/ --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --with-extra-charsets=gbk,gb2312,utf8 --without-innodb --without-isam --with-pthread --enable-thread-safe-client --with-innodb

source:http://gladness.itpub.net/post/6254/64504

總結

以上是生活随笔為你收集整理的mysql不能创建innodb类型表_MYSQL have_innodb DISABLED无法创建innodb类型的表的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。