4

When I am exporting database from phpmyadmin it gives me .sql html document. I have tried from both custom and quick export and I have also used from chrome and mozilla browser. I am using Ubuntu 14.04. Please help. I have waste whole night on this. May be its a system problem or browser promblem because I have tried to export database from phpmyadmin which is in my local machine and also from server both is giving same problem. the document like :

<!DOCTYPE HTML>
  <html lang='en' dir='ltr' class='firefox firefox39'>
  <head>
    <meta charset="utf-8" />
    <meta name="robots" content="noindex,nofollow" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <style id="cfs-style">html{display: none;}</style>
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="./themes/pmahomme/jquery/jquery-ui-1.11.2.css" />
    <link rel="stylesheet" type="text/css" href="js/codemirror/lib/codemirror.css?v=4.5.2" />
    <link .........
Piyush Gupta
  • 2,181
  • 3
  • 13
  • 28
alok
  • 2,718
  • 21
  • 17
  • Is your database large? Can you try a test export from the demo server at https://demo.phpmyadmin.net ? – Isaac Bennetch Apr 18 '16 at 02:30
  • I suppose you might be exceeding some webserver resource limit; can you also look in your webserver error log to see if there are any hints there? – Isaac Bennetch Apr 18 '16 at 14:37

2 Answers2

0

This problem occurs by due to very large size of database.

Go to your bin folder (if you are on local server) and type:

C:\xampp\mysql\bin>mysqldump -u root -p database_name_inPMA > anyDbName.sql
Enter password:your_password_here 

hit enter and your SQL file is exported into bin folder with name (anyDbName.sql)

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
inrsaurabh
  • 602
  • 1
  • 8
  • 17
0

In addition to above, this error occurs when the mysql port is not correct. Use this command:

mysqldump -u root -p --port=3307 DBNAME_inPHPMYADmin > database.sql from C:\xampp\mysql\bin folder

Make sure correct port is used. Worked for me! :)

Yannis
  • 1,682
  • 7
  • 27
  • 45
Avinash Thombre
  • 194
  • 1
  • 5