N
N
nevesomostjke2022-04-12 04:55:13
MySQL
nevesomostjke, 2022-04-12 04:55:13

What to change in MySQL config?

Hello!
I have this SQL query:

/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

CREATE TABLE IF NOT EXISTS `articles` (
  `supplierId` smallint(4) unsigned NOT NULL,
  `DataSupplierArticleNumber` varchar(32) NOT NULL,
  `ArticleStateDisplayValue` varchar(128) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `FlagAccessory` enum('True','False') NOT NULL,
  `FlagMaterialCertification` enum('True','False') NOT NULL,
  `FlagRemanufactured` enum('True','False') NOT NULL,
  `FlagSelfServicePacking` enum('True','False') NOT NULL,
  `FoundString` varchar(64) NOT NULL,
  `HasAxle` enum('True','False') NOT NULL,
  `HasCommercialVehicle` enum('True','False') NOT NULL,
  `HasCVManuID` enum('True','False') NOT NULL,
  `HasEngine` enum('True','False') NOT NULL,
  `HasLinkitems` enum('True','False') NOT NULL,
  `HasMotorbike` enum('True','False') NOT NULL,
  `HasPassengerCar` enum('True','False') NOT NULL,
  `IsValid` enum('True','False') NOT NULL,
  `LotSize1` int(10) unsigned DEFAULT NULL,
  `LotSize2` int(10) unsigned DEFAULT NULL,
  `NormalizedDescription` varchar(128) NOT NULL,
  `PackingUnit` int(10) unsigned DEFAULT NULL,
  `QuantityPerPackingUnit` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`supplierId`,`DataSupplierArticleNumber`),
  KEY `supplierId` (`supplierId`),
  KEY `DataSupplierArticleNumber` (`DataSupplierArticleNumber`),
  KEY `FoundString` (`FoundString`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

IF NOT EXISTS ;

CREATE TABLE IF NOT EXISTS `axle_trees` (
  `axleid` int(10) unsigned NOT NULL,
  `searchtreeid` int(10) unsigned NOT NULL,
  `id` int(10) unsigned NOT NULL,
  `parentid` int(10) unsigned DEFAULT NULL,
  `description` varchar(128) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `axleid` (`axleid`),
  KEY `parentid` (`parentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;


Mysql server version 8.0.28
When executing a query, I get an error:
6254dbb517441993775583.png
Swears at the line IF NOT EXISTS ; If you remove it, then everything is ok.

The problem is that on a local machine with the same version of mysql, everything is imported without any problems.
I would delete these lines, but I have 60 GB tables.

Can you please tell me what needs to be changed in the config so that mysql does not swear at this line?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael, 2022-04-12
@Akela_wolf

) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

IF NOT EXISTS ;

CREATE TABLE IF NOT EXISTS `axle_trees` (

This IF NOT EXISTS between requests - is it definitely imported without any problems?
Something seems to me that there is no and not in the MySQL settings at all.

S
Slava Rozhnev, 2022-04-12
@rozhnev

I'm not familiar with PHPMyAdmin but with a normal import you can skip the errors and continue
62553423a7935913972360.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question