Trouble uploading WordPress database


#1

Good day

I am having some issues uploading a WordPress site that I developed offline. I have tried following several tutorials and plugins, but I keep running into database issues.

When I manually try to upload the database, I get the following error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@', 1) LIMIT 1' at line 2

This seems like a very generic error, and I have yet to find a solution.

A bit more about my setup:

I am running Xampp win32-5.6.30-0-VC11. I export my database from PHPMyAdmin from the local host. I then replace all the references to “http://localhost/Wordpresstest” with the new 000webhost URL “https://hanno2.000webhostapp.com/”. I then create a database through the 000webhost user interface, giving it a name, user name and password. NextI click on the “Manage Database” link under my account. Finally I then import the database using the PHPMyadmin interface. This is the point at which I encounter the problem.

I have tried uploading a clean installation of WordPress just to see if any of my themes or plugins are giving me issues. I also tried using a plugin called “Duplicator” to upload the site, but to no avail.

Please could someone let me know where I am going wrong.

Many thanks and kind regards
Hanno


#2

Can you visit 000webhost.com > general settings > PHP version and make sure it matches what you run locally?


#3

Many thanks for your reply

I see that my PHP version was not the same. However, after setting it to what I believe is the right setting, I am still experiencing the same error.

Please refer to the bellow screenshots for reference.


#4

What lies at line 2?


#5

Hi again. Here is a copy of my first few lines of SQL code (Your system would not allow the whole document). It is from a clean installation of WordPress, just for testing purposes, but it still does not allow me to import it:

-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 06, 2017 at 11:36 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `wordpress`
--

-- --------------------------------------------------------

--
-- Table structure for table `wp_commentmeta`
--

CREATE TABLE `wp_commentmeta` (
  `meta_id` bigint(20) UNSIGNED NOT NULL,
  `comment_id` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `meta_value` longtext COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `wp_comments`
--

CREATE TABLE `wp_comments` (
  `comment_ID` bigint(20) UNSIGNED NOT NULL,
  `comment_post_ID` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  `comment_author` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
  `comment_author_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `comment_author_url` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `comment_author_IP` varchar(100) COLLATE utf8mb4_unicode_ci 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 COLLATE utf8mb4_unicode_ci NOT NULL,
  `comment_karma` int(11) NOT NULL DEFAULT '0',
  `comment_approved` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
  `comment_agent` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `comment_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `comment_parent` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  `user_id` bigint(20) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `wp_comments`
--

INSERT INTO `wp_comments` (`comment_ID`, `comment_post_ID`, `comment_author`, `comment_author_email`, `comment_author_url`, `comment_author_IP`, `comment_date`, `comment_date_gmt`, `comment_content`, `comment_karma`, `comment_approved`, `comment_agent`, `comment_type`, `comment_parent`, `user_id`) VALUES
(1, 1, 'A WordPress Commenter', 'wapuu@wordpress.example', 'https://wordpress.org/', '', '2017-03-06 10:12:56', '2017-03-06 10:12:56', 'Hi, this is a comment.\nTo get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.\nCommenter avatars come from <a href=\"https://gravatar.com\">Gravatar</a>.', 0, '1', '', '', 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `wp_duplicator_packages`
--

CREATE TABLE `wp_duplicator_packages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(250) NOT NULL,
  `hash` varchar(50) NOT NULL,
  `status` int(11) NOT NULL,
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `owner` varchar(60) NOT NULL,
  `package` mediumblob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `wp_duplicator_packages`
--

INSERT INTO `wp_duplicator_packages` (`id`, `name`, `hash`, `status`, `created`, `owner`, `package`) VALUES
(1, '20170306_wordpresstest', '58bd373e9f7f66281170306101734', 100, '2017-03-06 10:17:42', 'Admin', 0x4f3a31313a224455505f5061636b616765223a32333a7b733a373a2243726561746564223b733a31393a22323031372d30332d30362031303a31373a3334223b733a373a2256657273696f6e223b733a363a22312e312e3330223b733a393a2256657273696f6e5750223b733a353a22342e372e32223b733a393a2256657273696f6e4442223b733a373a2231302e312e3231223b733a31303a2256657273696f6e504850223b733a363a22352e362e3330223b733a393a2256657273696f6e4f53223b733a353a2257494e4e54223b733a323a224944223b693a313b733a343a224e616d65223b733a32323a2232303137303330365f776f7264707265737374657374223b733a343a2248617368223b733a32393a223538626433373365396637663636323831313730333036313031373334223b733a383a224e616d6548617368223b733a35323a2232303137303330365f776f72647072657373746573745f3538626433373365396637663636323831313730333036313031373334223b733a343a2254797065223b693a303b733a353a224e6f746573223b733a303a22223b733a393a2253746f726550617468223b733a34363a22433a2f78616d70702f6874646f63732f576f72645072657373546573742f77702d736e617073686f74732f746d70223b733a383a2253746f726555524c223b733a34343a22687474703a2f2f6c6f63616c686f73742f576f72647072657373746573742f77702d736e617073686f74732f223b733a383a225363616e46696c65223b733a36323a2232303137303330365f776f72647072657373746573745f35386264333733653966376636363238313137303330363130313733345f7363616e2e6a736f6e223b733a373a2252756e74696d65223b733a393a22362e3136207365632e223b733a373a2245786553697a65223b733a383a223338332e30364b42223b733a373a225a697053697a65223b733a373a2231372e33394d42223b733a363a22537461747573223b4e3b733a363a22575055736572223b733a353a2241646d696e223b733a373a2241726368697665223b4f3a31313a224455505f41726368697665223a31333a7b733a31303a2246696c74657244697273223b733a303a22223b733a31303a2246696c74657245787473223b733a303a22223b733a31333a2246696c74657244697273416c6c223b613a303a7b7d733a31333a2246696c74657245787473416c6c223b613a303a7b7d733a383a2246696c7465724f6e223b693a303b733a343a2246696c65223b733a36343a2232303137303330365f776f72647072657373746573745f35386264333733653966376636363238313137303330363130313733345f617263686976652e7a6970223b733a363a22466f726d6174223b733a333a225a4950223b733a373a225061636b446972223b733a32393a22433a2f78616d70702f6874646f63732f576f7264507265737354657374223b733a343a2253697a65223b693a31383233343832353b733a343a2244697273223b613a303a7b7d733a353a2246696c6573223b613a303a7b7d733a31303a2246696c746572496e666f223b4f3a32333a224455505f417263686976655f46696c7465725f496e666f223a363a7b733a343a2244697273223b4f3a33343a224455505f417263686976655f46696c7465725f53636f70655f4469726563746f7279223a343a7b733a373a225761726e696e67223b613a303a7b7d733a31303a22556e7265616461626c65223b613a303a7b7d733a343a22436f7265223b613a303a7b7d733a383a22496e7374616e6365223b613a303a7b7d7d733a353a2246696c6573223b4f3a32393a224455505f417263686976655f46696c7465725f53636f70655f46696c65223a353a7b733a343a2253697a65223b613a303a7b7d733a373a225761726e696e67223b613a303a7b7d733a31303a22556e7265616461626c65223b613a303a7b7d733a343a22436f7265223b613a303a7b7d733a383a22496e7374616e6365223b613a303a7b7d7d733a343a2245787473223b4f3a32393a224455505f417263686976655f46696c7465725f53636f70655f42617365223a323a7b733a343a22436f7265223b613a303a7b7d733a383a22496e7374616e6365223b613a303a7b7d7d733a393a2255446972436f756e74223b693a303b733a31303a225546696c65436f756e74223b693a303b733a393a2255457874436f756e74223b693a303b7d733a31303a22002a005061636b616765223b723a313b7d733a393a22496e7374616c6c6572223b4f3a31333a224455505f496e7374616c6c6572223a31323a7b733a343a2246696c65223b733a36363a2232303137303330365f776f72647072657373746573745f35386264333733653966376636363238313137303330363130313733345f696e7374616c6c65722e706870223b733a343a2253697a65223b693a3339323235363b733a31303a224f7074734442486f7374223b733a303a22223b733a31303a224f7074734442506f7274223b733a303a22223b733a31303a224f70747344424e616d65223b733a31343a2269643533313438375f68616e6e6f223b733a31303a224f707473444255736572223b733a31343a2269643533313438375f68616e6e6f223b733a31323a224f70747353534c41646d696e223b693a303b733a31323a224f70747353534c4c6f67696e223b693a303b733a31313a224f70747343616368655750223b693a303b733a31333a224f707473436163686550617468223b693a303b733a31303a224f70747355524c4e6577223b733a33333a2268747470733a2f2f68616e6e6f322e303030776562686f73746170702e636f6d2f223b733a31303a22002a005061636b616765223b723a313b7d733a383a224461746162617365223b4f3a31323a224455505f4461746162617365223a31323a7b733a343a2254797065223b733a353a224d7953514c223b733a343a2253697a65223b693a3630373537373b733a343a2246696c65223b733a36353a2232303137303330365f776f72647072657373746573745f35386264333733653966376636363238313137303330363130313733345f64617461626173652e73716c223b733a343a2250617468223b4e3b733a31323a2246696c7465725461626c6573223b733a303a22223b733a383a2246696c7465724f6e223b693a303b733a343a224e616d65223b4e3b733a31303a22436f6d70617469626c65223b733a303a22223b733a31303a22002a005061636b616765223b723a313b733a32353a22004455505f446174616261736500646253746f726550617468223b733a3131323a22433a2f78616d70702f6874646f63732f576f72645072657373546573742f77702d736e617073686f74732f746d702f32303137303330365f776f72647072657373746573745f35386264333733653966376636363238313137303330363130313733345f64617461626173652e73716c223b733a32333a22004455505f446174616261736500454f464d61726b6572223b733a303a22223b733a32363a22004455505f4461746162617365006e6574776f726b466c757368223b623a303b7d7d);

-- --------------------------------------------------------

--
-- Table structure for table `wp_links`
--

CREATE TABLE `wp_links` (
  `link_id` bigint(20) UNSIGNED NOT NULL,
  `link_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_target` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_visible` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Y',
  `link_owner` bigint(20) UNSIGNED NOT NULL DEFAULT '1',
  `link_rating` int(11) NOT NULL DEFAULT '0',
  `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `link_rel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `link_notes` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `link_rss` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `wp_options`
--

CREATE TABLE `wp_options` (
  `option_id` bigint(20) UNSIGNED NOT NULL,
  `option_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `option_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `autoload` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'yes'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `wp_options`


#6

Hi there.
Anyone can help us?When I change PHP version to same version with my old hosting. I met same problem.
There are 5 tables import success before crash:
wp_commentmeta
wp_comments
wp_duplicator_packages
wp_links
wp_options


#7

You can try xml import…
You can also try to export with different sql options such as drop tables…

Another options is to test on different hosting to see if the problem is with you or the host settings…


#8

can you try host as “localhost” instead of using ip?


#10