Unknown Column Name when Importing Table

走远了吗. 提交于 2020-01-07 08:52:06

问题


I have just exported a table using phpMyAdmin and I have tried to import this table into my local database by importing the sql file I have just exported. After phpMyAdmin imports 330 rows of the 15,000. It says:

1054 - Unknown column 'font_name' in 'field list'

How can anything go wrong, I thought it was straight forward export/import?

I have had a look at row 330 and 331 and there isn't anything wrong within the two columns.

How can I narrow this down? What is the problem likely to be?

Thanks all for any help

edit

CREATE TABLE IF NOT EXISTS `tags2` (
  `font_name` varchar(250) NOT NULL,
  `tags` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

回答1:


try a command line mysqldump instead of phpmyadmin




回答2:


In-fact the cause of this error message could be one of the following:

1) phpMyAdmin issue please check the admin settings like URL and data before doing the import. ( this is a common issue when you try to take import from the web admin phpMyAdmin)

if the setting is step one is correct please check point two and three

2) the character set in database, table, or column are not matched. so you need to do character set conversion to fix this issue. (I guess this is the issue in your case because usually the error message appear in this case)

3) privileges issue ( not so common)



来源:https://stackoverflow.com/questions/3434255/unknown-column-name-when-importing-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!