第二,打开config.inc.php文件找到
$cfg['Servers'][$i]['auth_type'] = 'config'
$cfg['Servers'][$i]['user'] = 'root'
$cfg['Servers'][$i]['password'] = ''
$cfg['Servers'][$i]['extension'] = 'mysqli'
$cfg['Servers'][$i]['AllowNoPassword'] = true
$cfg['Lang'] = ''
第三,把$cfg['Servers'][$i]['auth_type'] = 'config'注释掉;
增加$cfg['Servers'][$i]['auth_type'] = 'cookie'
第四,最后完整代码:
//$cfg['Servers'][$i]['auth_type'] = 'config'
$cfg['Servers'][$i]['auth_type'] = 'cookie'
$cfg['Servers'][$i]['user'] = 'root'
$cfg['Servers'][$i]['password'] = ''
$cfg['Servers'][$i]['extension'] = 'mysqli'
$cfg['Servers'][$i]['AllowNoPassword'] = true
$cfg['Lang'] = ''
MySQL导入WordPress Database Backup插件备份的数据文件时出错,用PhpMyAdmin导入sql文件时,MySQL 返回:#1100 - Table 'pma_column_info' was not locked with LOCK TABLES 错误。使用WordPress少不了经常要备份数据库,不管是插件备份的,还是其他方式备份的,恢复时都要导入数据库,而MySQL导入sql数据包时用的最多的就是PhpMyAdmin。用PhpMyAdmin导入时有时会报错。例如WordPress Database Backup插件自动备份的数据库文件导入时会提示:错误 SQL 查询: 编辑 SELECT `comment` FROM `phpmyadmin`.`pma_column_info` WHERE db_name = 'wordpress' AND table_name = '' AND column_name = '(db_comment)' MySQL 返回: #1100 - Table 'pma_column_info' was not locked with LOCK TABLES 这个错误与数据表锁定有关,解决方法也很简单:将备份得来的数据库文件解压(解压成一个sql文件)用Mircrosoft Office Word(版本无所谓)打开sql文件,编码要选择对,这个就是你当时建立数据库时选择的,一般情况下就是UTF-8,Word也会提示。打开替换(按CTRL+H),在查找内容里输入 <(LOCK TABLES)*(WRITE)>然后点高级,并在搜索选项下面勾选使用通配符,不然会提示找不到内容。选择全部替换就行了,记住要保存。将sql文件打包(也可以不打包)用PhpMyAdmin导入就行了。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)