2017-05-03 2 views
0

ich mysqldump auf ubuntu bin mit Dump-Datei der vorhandenen Datenbank zu übernehmenUnbekannte Datenbank in MySQL-Dump auf ubuntu

mysqldump -u username -h localhost -p databaseName > path/test.sql 

Aber ich bin immer Fehler wie

mysqldump: Got error: 1049: Unknown database 'databaseName' when selecting the database 

und test.sql erzeugt mit folgenden Inhalt

-- MySQL dump 10.13 Distrib 5.6.28, for debian-linux-gnu (x86_64) 
-- 
-- Host: localhost Database: databaseName 
-- ------------------------------------------------------ 
-- Server version 5.6.28-0ubuntu0.15.04.1 

/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */; 
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */; 
/*!40101 SET @[email protected]@COLLATION_CONNECTION */; 
/*!40101 SET NAMES utf8 */; 
/*!40103 SET @[email protected]@TIME_ZONE */; 
/*!40103 SET TIME_ZONE='+00:00' */; 
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */; 

Datenbank existieren, aber es zeigt immer noch Unbekannte Datenbank

+0

Kommentare nicht für längere Diskussion sind; Diese Konversation wurde zum Chat verschoben (http://chat.stackoverflow.com/rooms/143294/discussion-on-question-by-hrishi-unknown-database-in-mysql-dump-on-ubuntu). –

Antwort

0

Schließlich ist es mit Hilfe von Suggestions von Jens getan. Schritte folgte ich als

Jetzt MariaDB

/opt/lampp/bin/mysql -u root -p 

und anschließend

\! /opt/lampp/bin/mysqldump -u username -h localhost -p databaseName > path/test.sql 
Verwandte Themen