Forum

Thread tagged as: Question, Problem, Error

Error mysql

Hi,

I emptied the tables in my Production server and imported the .sql file from localhost, however I encountered the following:

Error
SQL query:
--
-- Indexes for dumped tables
--
--
-- Indexes for table `perch2_categories`
--
ALTER TABLE  `perch2_categories` ADD PRIMARY KEY (  `catID` ) ,
ADD KEY  `idx_set` (  `setID` ) ;

MySQL said: Documentation

#1068 - Multiple primary key defined

Here is my diagnostic report:

Perch: 2.8.32
Production mode: (PERCH_DEVELOPMENT)
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32)
DB driver: PDO
DB tables: perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (2414), perch2_content_items (590), perch2_content_regions (71), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (32), perch2_resource_log (341), perch2_resource_tags (0), perch2_resources (69), perch2_resources_to_tags (0), perch2_settings (11), perch2_user_passwords (0), perch2_user_privileges (28), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2)
Users: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Editor plug-ins: ace
H1: c2363991e8aa08dce658fe7b42dd9f96
L1: 8da62c38261037789cd5262544577b63
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.31: done
latest_version: 2.8.15
on_sale_version: 2.8.32
update_2.8.32: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE:
PERCH_DB_USERNAME:
PERCH_DB_PREFIX: perch2_
PERCH_RESFILEPATH:
PERCH_RESPATH: /images
PERCH_TZ: Australia/Sydney
PERCH_EMAIL_FROM:
PERCH_EMAIL_FROM_NAME:
PERCH_LOGINPATH: /perch
PERCH_PATH:
PERCH_CORE:
PERCH_HTML5: 1
PERCH_DEBUG:
PERCH_PRODUCTION_MODE: PERCH_DEVELOPMENT
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 7.0.13
Zend: 3.0.0
OS: Linux
SAPI: litespeed
Safe mode: not detected
MySQL client: 5.6.34
MySQL server: 5.6.34
Free disk space: 349.80 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, bcmath, dom, fileinfo, gd, imap, intl, json, exif, mcrypt, mysqli, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, soap, sockets, tidy, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip
GD: Yes
ImageMagick: No
PHP max upload size: 8M
PHP max form post size: 64M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch, br
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.8
HTTP_COOKIE: _gat=1; _ga=GA1.3.1203286835.1482480815; cmsa=1; PHPSESSID=o7j1c2p199qchbnnr748vmigh7
HTTP_HOST:
HTTP_REFERER:
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_DNT: 1
DOCUMENT_ROOT:
REMOTE_ADDR: 120.18.22.181
REMOTE_PORT: 60770
SERVER_ADDR: 103.252.154.19
SERVER_NAME:
SERVER_ADMIN:
SERVER_PORT: 443
REQUEST_URI: /perch/core/settings/diagnostics/?extended
HTTPS: on
REDIRECT_STATUS: 200
X_SPDY: HTTP2
SSL_PROTOCOL: TLSv1.2
SSL_SESSION_ID: 5792f24372979623ca7485b6f5d4556e48992f934374eaf56e8fc35ccf450b2e
SSL_CIPHER: ECDHE-RSA-AES128-GCM-SHA256
SSL_CIPHER_USEKEYSIZE: 128
SSL_CIPHER_ALGKEYSIZE: 128
SCRIPT_FILENAME:
QUERY_STRING: extended
SCRIPT_URI:
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: LiteSpeed
REQUEST_METHOD: GET
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1482481126.3322
REQUEST_TIME: 1482481126

Thanks for any information.

Garth Holmes

Garth Holmes 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

A bit hard to say as I can't see either system. How did you export the database? Have you checked your options there?

Is the diagnostics from the source or destination server?

Hi Drew,

Diagnostics and error were both from the destination server however from reading other posts here, I gather it may just be that something, e.g. a field already exists and that the import, i.e. the .sql file was simply tryin to re-create it.

There doesn't appear to be anything wrong functionally so I will write back if there is, in the meantime I may write to my web hosting.

Thank you