2010-06-01 44 views
0

我對以前的Wordpress安裝程序很熟悉,但是在這個新版本中,我碰到了一些我沒看到記錄的新東西。Wordpress v2.9.2無法在MAMP上創建數據庫

我正在嘗試安裝Wordpress到MAMP作爲我的本地主機,我收到錯誤,指出表創建失敗。

PHP:5.2.11

MySQL的:5.1.37

我使用安裝程序界面來設置數據庫設置,我也手動試了一下,沒有差別。

在安裝成功屏幕上出現以下錯誤。表wp-commentmeta和wp-links被創建,並且我被給了一個登錄名/密碼 - 即使用戶的表不被創建。消息稱更新/插入等失敗,因爲該表不存在的

WordPress database error: [MyISAM table 'wp_terms' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_terms (term_id bigint(20) unsigned NOT NULL auto_increment, name varchar(200) NOT NULL default '', slug varchar(200) NOT NULL default '', term_group bigint(10) NOT NULL default 0, PRIMARY KEY (term_id), UNIQUE KEY slug (slug), KEY name (name)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_term_taxonomy' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_term_taxonomy (term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment, term_id bigint(20) unsigned NOT NULL default 0, taxonomy varchar(32) NOT NULL default '', description longtext NOT NULL, parent bigint(20) unsigned NOT NULL default 0, count bigint(20) NOT NULL default 0, PRIMARY KEY (term_taxonomy_id), UNIQUE KEY term_id_taxonomy (term_id,taxonomy), KEY taxonomy (taxonomy)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_term_relationships' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_term_relationships (object_id bigint(20) unsigned NOT NULL default 0, term_taxonomy_id bigint(20) unsigned NOT NULL default 0, term_order int(11) NOT NULL default 0, PRIMARY KEY (object_id,term_taxonomy_id), KEY term_taxonomy_id (term_taxonomy_id)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_comments' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_comments (comment_ID bigint(20) unsigned NOT NULL auto_increment, comment_post_ID bigint(20) unsigned NOT NULL default '0', comment_author tinytext NOT NULL, comment_author_email varchar(100) NOT NULL default '', comment_author_url varchar(200) NOT NULL default '', comment_author_IP varchar(100) NOT NULL default '', comment_date datetime NOT NULL default '0000-00-00 00:00:00', comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', comment_content text NOT NULL, comment_karma int(11) NOT NULL default '0', comment_approved varchar(20) NOT NULL default '1', comment_agent varchar(255) NOT NULL default '', comment_type varchar(20) NOT NULL default '', comment_parent bigint(20) unsigned NOT NULL default '0', user_id bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (comment_ID), KEY comment_approved (comment_approved), KEY comment_post_ID (comment_post_ID), KEY comment_approved_date_gmt (comment_approved,comment_date_gmt), KEY comment_date_gmt (comment_date_gmt)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_options' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_options (option_id bigint(20) unsigned NOT NULL auto_increment, blog_id int(11) NOT NULL default '0', option_name varchar(64) NOT NULL default '', option_value longtext NOT NULL, autoload varchar(20) NOT NULL default 'yes', PRIMARY KEY (option_id), UNIQUE KEY option_name (option_name)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_postmeta' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_postmeta (meta_id bigint(20) unsigned NOT NULL auto_increment, post_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (meta_id), KEY post_id (post_id), KEY meta_key (meta_key)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_posts' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_posts (ID bigint(20) unsigned NOT NULL auto_increment, post_author bigint(20) unsigned NOT NULL default '0', post_date datetime NOT NULL default '0000-00-00 00:00:00', post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', post_content longtext NOT NULL, post_title text NOT NULL, post_excerpt text NOT NULL, post_status varchar(20) NOT NULL default 'publish', comment_status varchar(20) NOT NULL default 'open', ping_status varchar(20) NOT NULL default 'open', post_password varchar(20) NOT NULL default '', post_name varchar(200) NOT NULL default '', to_ping text NOT NULL, pinged text NOT NULL, post_modified datetime NOT NULL default '0000-00-00 00:00:00', post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00', post_content_filtered text NOT NULL, post_parent bigint(20) unsigned NOT NULL default '0', guid varchar(255) NOT NULL default '', menu_order int(11) NOT NULL default '0', post_type varchar(20) NOT NULL default 'post', post_mime_type varchar(100) NOT NULL default '', comment_count bigint(20) NOT NULL default '0', PRIMARY KEY (ID), KEY post_name (post_name), KEY type_status_date (post_type,post_status,post_date,ID), KEY post_parent (post_parent)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_users' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_users (ID bigint(20) unsigned NOT NULL auto_increment, user_login varchar(60) NOT NULL default '', user_pass varchar(64) NOT NULL default '', user_nicename varchar(50) NOT NULL default '', user_email varchar(100) NOT NULL default '', user_url varchar(100) NOT NULL default '', user_registered datetime NOT NULL default '0000-00-00 00:00:00', user_activation_key varchar(60) NOT NULL default '', user_status int(11) NOT NULL default '0', display_name varchar(250) NOT NULL default '', PRIMARY KEY (ID), KEY user_login_key (user_login), KEY user_nicename (user_nicename)) DEFAULT CHARACTER SET utf8 

WordPress database error: [MyISAM table 'wp_usermeta' is in use (most likely by a MERGE table). Try FLUSH TABLES.] 
CREATE TABLE wp_usermeta (umeta_id bigint(20) unsigned NOT NULL auto_increment, user_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (umeta_id), KEY user_id (user_id), KEY meta_key (meta_key)) DEFAULT CHARACTER SET utf8 

然後很多

以前有人遇到過這個嗎?

編輯:MAMP報告mysql的端口8889,所以我改變了wp-config中的主機名爲localhost:8889。哪一個沒有奏效。

編輯:我解決了這個問題。我有一個以前的數據庫wordpress,我刪除並重新創建反覆試圖解決這個問題。 顯然刪除它並不夠好,因爲通過創建名爲newwordpress的數據庫並使用它來解決問題。

MySQL必須從已刪除的數據庫中保留一些數據。

+0

您是否100%確定您在空數據庫上執行此操作? – 2010-06-01 14:27:00

+0

當我看着phpmyadmin它肯定看起來是空的。我已經將每個新嘗試的所有表放到數據庫中。 – YsoL8 2010-06-01 15:33:46

+0

您是否檢查過您擁有寫入/創建表格權限的用戶(不只是讀取,選擇?) – 2010-06-02 13:25:56

回答

1

你確定你的MAMP數據庫有正確的端口嗎?我忘記了這一點,它在我的機器上打了默認的mySQL服務器。

編輯:您的MAMP安裝的端口號在設置對話框中指定。默認情況下,它可能是8889.您可以閱讀WordPress documentation關於如何指定非默認mySQL端口。

+0

如何檢查? – YsoL8 2010-06-01 13:46:29

+0

檢查編輯。 – 2010-06-01 13:54:12

+0

MAMP在url中產生這個:localhost:8888 我認爲這是默認的WordPress的端口 – YsoL8 2010-06-01 13:57:34

0

使用phpmyadmin來查看數據庫是否被創建。如果沒有,創建數據庫:3. MySQL (MAMP & MAMP PRO Documentation)

+0

我正在使用預先存在的數據庫。 Wordpress至少發現,因爲它打破之前創建兩個表。 – YsoL8 2010-06-01 15:32:23

+0

使用phpmyadmin創建一個新數據庫: http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP – markratledge 2010-06-02 01:37:19