How to dump database in mysql using command line [duplicate]
This question already has an answer here:
Error while taking backup with mysqldump in mysql command line
5 answers
I want to dump my database into one file with .sql extension using command line.
I've tried all the possible actions suggested in https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
mysqldump test > dump.sql
but it gives me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump gamescholar > dump.sql' at line 1
so why I am getting this error and how to fix it?
note--> the database is already there I checked it using show databases; command.
mysql
marked as duplicate by GMB, Shadow
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 0:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Error while taking backup with mysqldump in mysql command line
5 answers
I want to dump my database into one file with .sql extension using command line.
I've tried all the possible actions suggested in https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
mysqldump test > dump.sql
but it gives me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump gamescholar > dump.sql' at line 1
so why I am getting this error and how to fix it?
note--> the database is already there I checked it using show databases; command.
mysql
marked as duplicate by GMB, Shadow
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 0:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28
add a comment |
This question already has an answer here:
Error while taking backup with mysqldump in mysql command line
5 answers
I want to dump my database into one file with .sql extension using command line.
I've tried all the possible actions suggested in https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
mysqldump test > dump.sql
but it gives me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump gamescholar > dump.sql' at line 1
so why I am getting this error and how to fix it?
note--> the database is already there I checked it using show databases; command.
mysql
This question already has an answer here:
Error while taking backup with mysqldump in mysql command line
5 answers
I want to dump my database into one file with .sql extension using command line.
I've tried all the possible actions suggested in https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html
mysqldump test > dump.sql
but it gives me this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump gamescholar > dump.sql' at line 1
so why I am getting this error and how to fix it?
note--> the database is already there I checked it using show databases; command.
This question already has an answer here:
Error while taking backup with mysqldump in mysql command line
5 answers
mysql
mysql
edited Jan 2 at 22:32


GMB
20.6k41028
20.6k41028
asked Jan 2 at 22:25
loay mansourloay mansour
346
346
marked as duplicate by GMB, Shadow
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 0:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by GMB, Shadow
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Jan 3 at 0:28
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28
add a comment |
1
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28
1
1
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28
add a comment |
1 Answer
1
active
oldest
votes
you need to execute mysqldump
command inside shell
you are trying to run command inside MySql Client
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you need to execute mysqldump
command inside shell
you are trying to run command inside MySql Client
add a comment |
you need to execute mysqldump
command inside shell
you are trying to run command inside MySql Client
add a comment |
you need to execute mysqldump
command inside shell
you are trying to run command inside MySql Client
you need to execute mysqldump
command inside shell
you are trying to run command inside MySql Client
answered Jan 2 at 22:33


Derviş KayımbaşıoğluDerviş Kayımbaşıoğlu
15.7k22042
15.7k22042
add a comment |
add a comment |
1
Run the "mysqldump" command from the command line, not from inside the mysql client. It's not an SQL command.
– Progman
Jan 2 at 22:28