How to Export WordPress MySQL Database on Rackspace Deployment Where You Have Only Command Line Option and Ports are Blocked for Security? We talked about Rackspace Deployment, when it was available to us for evaluation, if you go for such setup with minimum 3 server and one load balancer configuration, you will find it quite difficult to perform the database migration without making the website offline. If you are running WordPress on a Single Server in the way we described in the Full step by step guide to Install WordPress on Ubuntu 13.10 on Rackspace or use Database as a Service, you will definitely understand the issue with exporting database in easy way.
No Proper Guide Exits to Export WordPress MySQL Database on Rackspace Deployment for the New Users
Database management is a super specialty and actually the guides the typical websites write about to export WordPress MySQL Database in these ways :
- Using some plugin to import
- Using PHPMyAdmin to import
- Using Command Line on “normal” server
These will invariably fail. The commands like :
mysqldump -u username -p databasename > backup.sql
will actually never get realized on such setup as we will login on the MySQL database server as root user. The database created in the Deployment has an user and password – you actually know it from the dashboard. This method on How to Export WordPress MySQL Database on Rackspace Deployment is actually for avoiding the downtime. All are written in official MySQL website. We are making it simple as most lacks the idea of MySQL Database management.
Commands How to Export WordPress MySQL Database on Rackspace Deployment
You can take the SQL backup of your existing WordPress in the way you like. You can :
- Use WordPress Plugin
- Use PHPMyAdmin
- Use Commandline
Follow our SQL Commands to Clean WordPress Database to clean the WordPress database first before exporting. It will decrease the chance of having errors. We are avoiding the terminologies.
You probably have saved the Private Key on your Mac or Linux PC (or may be Windows PC, its too unsafe to work with).
If you have saved the Private Key properly, you will be able to login to the MySQL server by doing simple SSH. Before that, you will keep your MySQL database backup either as SQL or tar ball in some publicly accessible folder on the old FTP Server so that you can simply wget it from this MySQL server.
Suppose, I kept the MySQL backup on
https://thecustomizewindows.com/my-backup.sql location, I can SSH on the MySQL server, I will be on
/root by default. I can wget it :
The trick is on MySQL part. You need no username password anymore to execute this
my-backup.sql dump on the existing database. You will not remove the already created database but only execute this dump. It is more simple than you can think of. Actually you need to refer to MySQL Forum or Guides not WordPress Forums or Guides. WordPress associated peoples will not know the core tricks of managing database server or tweaking UNIX / Linux Server. They know only somethings about PHP and the PHPMyAdmin interface. PHP is never considered as a superior scripting language, BTW.
You have wget-ed the
my-backup.sql MySQL dump while in
/root. Do not forget to delete the
https://thecustomizewindows.com/my-backup.sql thing. Else people will download it! Type :
# you are logged in to mysql server
# mysql server is a software and your physical (I mean cloud) server is where you are
# confusion happens as root is also a mysql user
# whose password unfortunately
# might not match or your keyboard mapping
# will prevent you to rightly type the password
# So --> we will run sql commands as owner of the Server where
# your mysql server software is running
# mysql obviously will take your commands
# its your server. 2 cents
You can run query to list the databases :
It will give an output in a kind of artistic way :
| Database |
| information_schema |
| mysql |
| your-database |
your-database is what your Deployment is using ==> easiest way to get that info is opening the Master FTP server’s
wp-config.php file. The user will not be root but your username on Rackspace (by default).
Now select the database :
The semi-colon is important. If you mess-up, you can type
c to get rid from
-> thing. When
mysql> is present, it indicates you are doing the right. Appearance of
-> means you have done something which we do not need here. Not everyone knows about MySQL. These descriptions might bore the advanced users.
Its not that bad, actually you can see the Tables too now :
wp_postmeta etc. will show up. Again, make sure that you are using the right database :
Just execute the backup like we do for running bash scripts :
It looks great to see the scrolling output! Yes, done. What is more? !Tagged With export wordpress database windows , php myadmin default password , show database; , wordpress mysql export