How to dump database in mysql using command line [duplicate]












-1
















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.










share|improve this question















marked as duplicate by GMB, Shadow mysql
Users with the  mysql badge can single-handedly close mysql questions as duplicates and reopen them as needed.

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
















-1
















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.










share|improve this question















marked as duplicate by GMB, Shadow mysql
Users with the  mysql badge can single-handedly close mysql questions as duplicates and reopen them as needed.

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














-1












-1








-1









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.










share|improve this question

















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 mysql
Users with the  mysql badge can single-handedly close mysql questions as duplicates and reopen them as needed.

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 mysql
Users with the  mysql badge can single-handedly close mysql questions as duplicates and reopen them as needed.

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














  • 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












1 Answer
1






active

oldest

votes


















2














you need to execute mysqldump command inside shell



you are trying to run command inside MySql Client






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    you need to execute mysqldump command inside shell



    you are trying to run command inside MySql Client






    share|improve this answer




























      2














      you need to execute mysqldump command inside shell



      you are trying to run command inside MySql Client






      share|improve this answer


























        2












        2








        2







        you need to execute mysqldump command inside shell



        you are trying to run command inside MySql Client






        share|improve this answer













        you need to execute mysqldump command inside shell



        you are trying to run command inside MySql Client







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 2 at 22:33









        Derviş KayımbaşıoğluDerviş Kayımbaşıoğlu

        15.7k22042




        15.7k22042

















            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            Npm cannot find a required file even through it is in the searched directory