Magento Server Change&恢复数据库错误

时间:2015-07-24 13:43:21

标签: mysql magento

需要帮助将Magento网站恢复到新服务器。

我已经将文件恢复到新服务器并尝试通过phpMyAdmin恢复MySQL。但每次我尝试导入MySQL时,都会收到以下错误:

SQL查询:

Warning : USING UNIQUE OPTION prefix pass instead of PASSWORD IS deprecated AND will be removed IN a future release.Please USE the FULL name instead.-- MySQL dump 10.13 Distrib 5.5.42, for Linux (x86_64)
--
-- Host: localhost Database: XXXXXX
-- ------------------------------------------------------
-- Server version 5.5.42-cll
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Warning: Using unique option prefix pass instead of password is deprecated and w' at line 1

1 个答案:

答案 0 :(得分:0)

首先检查您的服务器如下脚本:

extension_check(array( 
    'curl',
    'dom', 
    'gd', 
    'hash',
    'iconv',
    'mcrypt',
    'pcre', 
    'pdo', 
    'pdo_mysql', 
    'simplexml'
));
function extension_check($extensions) {
    $fail = '';
    $pass = '';

    if(version_compare(phpversion(), '5.2.0', '<')) {
        $fail .= '<li>You need<strong> PHP 5.2.0</strong> (or greater;<strong>Current Version:'.phpversion().')</strong></li>';
    }
    else {
        $pass .='<li>You have<strong> PHP 5.2.0</strong> (or greater; <strong>Current Version:'.phpversion().')</strong></li>';
    }
    if(!ini_get('safe_mode')) {
        $pass .='<li>Safe Mode is <strong>off</strong></li>';
        preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);

        if(version_compare($version[0], '4.1.20', '<')) {
            $fail .= '<li>You need<strong> MySQL 4.1.20</strong> (or greater; <strong>Current Version:.'.$version[0].')</strong></li>';
        }
        else {
            $pass .='<li>You have<strong> MySQL 4.1.20</strong> (or greater; <strong>Current Version:'.$version[0].')</strong></li>';
        }
    }
    else { $fail .= '<li>Safe Mode is <strong>on</strong></li>';  }
    foreach($extensions as $extension) {
        if(!extension_loaded($extension)) {
            $fail .= '<li> You are missing the <strong>'.$extension.'</strong> extension</li>';
        }
        else{   $pass .= '<li>You have the <strong>'.$extension.'</strong> extension</li>';
        }
    }

    if($fail) {
        echo '<p><strong>Your server does not meet the following requirements in order to install Magento.</strong>';
        echo '<br>The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:';
        echo '<ul>'.$fail.'</ul></p>';
        echo 'The following requirements were successfully met:';
        echo '<ul>'.$pass.'</ul>';
    } else {
        echo '<p><strong>Congratulations!</strong> Your server meets the requirements for Magento.</p>';
        echo '<ul>'.$pass.'</ul>';
    }
}

##Test What Exact Version PHP & MySQL
echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION); 

##### Without DB Access 
ob_start(); 
phpinfo(INFO_MODULES); 
$info = ob_get_contents(); 
ob_end_clean(); 
$info = stristr($info, 'Client API version'); 
preg_match('/[1-9].[0-9].[1-9][0-9]/', $info, $match); 
$gd = $match[0]; 
echo '</br>MySQL:  '.$gd.' <br />';