2

Recently I uninstalled the Wamp Server and re-installed the newer version of Wamp Server which is 3.1.3

Note: I am using Windows 10

Below are all the details of Wamp Server:

Apache Version: 2.4.33  
PHP Version: 5.6.35
MySQL Version: 5.7.21 
phpMyAdmin Version: 4.7.9

When I click on MYSQL Database in phpMyAdmin and then click on Export, the phpMyAdmin shows blank page. However, when I click on Import, phpMyAdmin doesn't show blank page at all. But the strange thing is when clicking on Export, phpMyAdmin shows Blank Page.

Since, I'm trying to export a Database from phpMyAdmin, I need to make sure that the page doesn't go blank when clicking on "Export" button.

I'm not sure regarding how to approach this problem because I'm very new in phpMyAdmin.

Would be really helpful if any recommended advice or solution is provided.

beginIT
  • 227
  • 1
  • 6
  • 21

2 Answers2

5

If you want to export the database using Command Line, then in that case, you can use mysqldump command.

If it's an entire DB, then:

   $ mysqldump -u [uname] -p[pass] db_name > db_backup.sql

If it's all DBs, then:

   $ mysqldump -u [uname] -p[pass] --all-databases > all_db_backup.sql

If it's specific tables within a DB, then:

   $ mysqldump -u [uname] -p[pass] db_name table1 table2 > table_backup.sql

You can even go as far as auto-compressing the output using gzip (if your DB is very big):

   $ mysqldump -u [uname] -p[pass] db_name | gzip > db_backup.sql.gz

uname - Username of database
pass - Password of database

You can check this answer

If you are using Windows then you need to change directory to C:\wamp\bin\mysql\mysql-version\bin and do above steps.

akshaypjoshi
  • 1,245
  • 1
  • 15
  • 24
  • This is how my directory looks like C:\wamp64\bin\mysql\mysql5.7.21\bin ... But after I click the second bin (after mysql5.7.21) there are showing lots of application files ... Which exact file do I need to click on ? – beginIT Aug 28 '18 at 18:55
  • Change directory to `C:\wamp64\bin\mysql\mysql5.7.21\bin` using `cd` command in your `cmd` or `Command Prompt` then try above commands. – akshaypjoshi Aug 28 '18 at 18:57
  • I did change directory to C:\wamp64\bin\mysql\mysql5.7.21\bin in my cmd by using cd and then I typed $ mysqldump -u [uname] -p[pass] bigm > db_backup.sql but they are showing this error: '$' is not recognized as an internal or external command, operable program or batch file. – beginIT Aug 28 '18 at 19:08
  • If you are using Windows, you don't need to enter `$` sign, `$` sign is indication for user in linux system. Directly hit commands excluding `$` – akshaypjoshi Aug 28 '18 at 19:09
  • I removed $ sign ...This is what I typed now mysqldump -u [root] -p[ ] bigm > db_backup.sql .. This is the message being displayed - mysqldump: [Warning] Using a password on the command line interface can be insecure. mysqldump: Got error: 1045: Access denied for user '[root]'@'localhost' (using password: YES) when trying to connect – beginIT Aug 28 '18 at 19:14
  • When I login to phpMyAdmin, my username is 'root' and my password is blank – beginIT Aug 28 '18 at 19:16
  • Then, in that case, you don't have to insert the password. `mysqldump -u root -p bigm > db_backup.sql` and when it prompt for password just hit enter. Username and password should be without braces`[]` – akshaypjoshi Aug 28 '18 at 19:19
  • I did that .... It shows "Enter Password:" and I hit enter right away and then it is showing C:\wamp64\bin\mysql\mysql5.7.21\bin> – beginIT Aug 28 '18 at 19:21
  • Now please check your `C:\wamp64\bin\mysql\mysql5.7.21\bin` for `db_backup.sql` file. – akshaypjoshi Aug 28 '18 at 19:22
  • Yes ... I found it now ... Really appreciate it – beginIT Aug 28 '18 at 19:25
  • Welcome. Thanks for Appreciation. – akshaypjoshi Aug 28 '18 at 19:26
0

If you're using Ubuntu. That problem caused by, you have not installed libapache2-mod-php. So, install with :

$ sudo apt install php libapache2-mod-php

then restart apache

$ sudo service apache2 restart
akshaypjoshi
  • 1,245
  • 1
  • 15
  • 24
Eyad
  • 37
  • 7