在 EasyPHP 中使用 phpmyadmin 导入 sql 文件

2021-12-25 00:00:00 import database mysql easyphp

我有一个用 php 和 mysql(由其他人编写)编写的网站,我需要对其进行更改 - 只是为了您的兴趣,它是 bridgetjonesart.co.uk.所以我想我会把它下载到我的台式电脑上,并在本地使用简单的 php 和 mysql 进行更改,然后再次上传.

I have a website written in php and mysql (written by someone else) and I need to alter it- just for your interest it is bridgetjonesart.co.uk. So I thought I would download it to my desktop pc and use easy php and mysql locally to make changes then upload it again.

我将 sql 数据库作为根目录中的文件runningc_bjart.sql".我首先使用 php admin 创建一个与原始数据库同名的数据库,然后使用 import ......似乎创建了一个表,但随后出现错误......错误

I have the sql database as a file 'runningc_bjart.sql' in the root directory. I first use php admin to create a database of the same name as the orginal and then use import ... one table appears to be created but then getting an error... Error

SQL query: DocumentationEdit Edit

SELECT  `comment` 
FROM  `phpmyadmin`.`pma_column_info` 
WHERE db_name =  'runningc_bjart'
AND table_name =  ''
AND column_name =  '(db_comment)'

MySQL said: Documentation

#1100 - Table 'pma_column_info' was not locked with LOCK TABLES 
---------

Error
SQL query: DocumentationEdit Edit

SELECT  `comment` 
FROM  `phpmyadmin`.`pma_column_info` 
WHERE db_name =  'runningc_bjart'
AND table_name =  ''
AND column_name =  '(db_comment)'

MySQL said: Documentation

#1100 - Table 'pma_column_info' was not locked with LOCK TABLES 

我不确定接下来要尝试什么,任何帮助将不胜感激.谢谢你.布里奇特

I am not sure what to try next, any help would be really appreciated. Thank you. Bridget

推荐答案

浪费了很多时间,我有一个解决方案,所以在这里.

Having wasted many hours, I have a solution so here it is.

查看网络后,我发现我需要更改 phpadmin 目录中的 config.inc.php 文件,因为我运行的是 EasyPHP 13.1 密码,这与 config.inc.php 博客中提到的密码略有不同a href="http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html" rel="noreferrer">http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html.我添加了 2 行:

Having a look on the web I found I needed to change my config.inc.php file in the phpadmin directory as I was running EasyPHP 13.1 password slightly diff to that mentioned in the blog at http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html. I added 2 lines:

$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '';

所以都排序了!!伊皮!!

So all sorted !! Yippee!!

因此,如果您遇到问题,请阅读:
http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html

So if you have trouble please read:
http://amir-shenodua.blogspot.co.uk/2012/03/error-while-importing-db-in-mysql.html

相关文章