8 Years
Discussion Span
Last Post by peter_budo

hey guys,
i am using XAMPP and i want to take the back up of my database.
Please give some suggestions

Did you install phpMyAdmin tool with it? If so there is option to export, when you do that you can save your data in various formats (sql, csv, xml and more), else go with mysqldump as suggested by pritaeas


Are you able to access your MySQL through Command Prompt?
The command is

mysql -u YourUsername -p

that will trigger request for password. After submission of correct password you can type SQL commands show databases; . Let me know if you can do that...


This is what i wrote in cmd but it gave an error
" C:\>mysql -u root -p
'mysql' is not recognized as an internal or external command,
operable program or batch file. "


Find MySQL Server Instance Config Wizard, this should be either under Start/All Programs/MySQL/MySQL Server 5 or can be found under C:\Program Files\MySQL\MySQL Server 5.0\bin
Run config wizard Welcome screen -> go Next
Choose maintenance option -> Reconfigure Instance
Select configuration type -> Standard Configuration
You see following screen

Mark checkbox for "Include Bin Directory in Windows PATH" ->Next Security options -> Uncheck "Modify Security Settings" which enable Next button and press the button finish with Execute Try again above command and let me know if you able to access DB now

PS: Sometimes computer restart need to be done after this change of configuration

Attachments mysql.png 11.28 KB

Or you can simply drive to your mysql installation folder and to bin folder

and try

mysql -u root -p


Than Configuration step just adds path to mysql\Bin folder in environmental variables

example : %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\Program_Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\Program_Files\Microsoft SQL Server\90\DTS\Binn\;D:\Program_Files\Microsoft SQL Server\90\Tools\binn\;D:\Program_Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\QuickTime\QTSystem\

so when you type mysql in Cmd system knows where to go
that the easy way of doing it

But its not a must step

you can drive to your mysql installation folder and to bin folder
and use

mysql -u root -ppassword
                   or mysqladmin or mysqldump

OK, now you should be able to run mysqldump command as follows

mysqldump -u USERNAME NameOfDatabase>FileName.sql -p

This will dump selected database to sql file

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.