MySQL Forums
Forum List  »  NDB clusters

Failed to create TABLESPACE
Posted by: Jitender Singh
Date: October 17, 2016 10:15AM

Hi, I am running cluster with 2 data nodes, 1 SQL and 1 Management node. My cluster is running fine. I thought of taking database dump using "mysqldump" utility and I took it successfully. Now when I am trying to restore dump (which I took it from mysqldump), I am getting error "Failed to create TABLESPACE".

Below is my mgm-config

[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataDir=D:\\mysql-cluster\\cluster-data # Directory for each data node's data files

DataMemory=8M # Memory allocated to data storage
IndexMemory=8M # Memory allocated to index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.

[ndb_mgmd]
# Management process options:
HostName=127.0.0.1 # Hostname or IP address of management node
DataDir=D:\\mysql-cluster\\cluster-log # Directory for management node log files
NodeID=1

[ndbd]
# Options for data node "A":
# (one [ndbd] section per data node)
HostName=127.0.0.1 # Hostname or IP address
NodeID=2

[ndbd]
# Options for data node "B":
HostName=127.0.0.1 # Hostname or IP address
NodeID=3

[mysqld]
# SQL node options:
HostName=127.0.0.1 # Hostname or IP address
NodeID=4


D:\mysql-cluster\mysql\bin>mysql -uroot clusterdb < D:\clusterdb.sql
ERROR 1528 (HY000) at line 22: Failed to create TABLESPACE

My cluststerdb.sql file(which I took using mysqldump) output is below.

-- MySQL dump 10.13 Distrib 5.6.31-ndb-7.4.12, for Win64 (x86_64)
--
-- Host: localhost Database: clusterdb
-- ------------------------------------------------------
-- Server version 5.6.31-ndb-7.4.12-cluster-gpl-log

/*!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 utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Tablespace: ts_1
--

CREATE TABLESPACE ts_1
ADD DATAFILE 'data_2.dat'
USE LOGFILE GROUP lg_1
EXTENT_SIZE 1048576
INITIAL_SIZE 50331648
ENGINE=ndbcluster;

ALTER TABLESPACE ts_1
ADD DATAFILE 'data_1.dat'
INITIAL_SIZE 33554432
ENGINE=ndbcluster;

--
-- Table structure for table `dt_1`
--

I have also given full permission to data directory.

Not sure what need to be changed in configuration or am I missing any parameter in restore command.

Thanks in advance

Options: ReplyQuote


Subject
Views
Written By
Posted
Failed to create TABLESPACE
3572
October 17, 2016 10:15AM
1005
October 17, 2016 12:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.