Exporting Database Using phpMyAdmin - mysql

I'm attempting to switch from Third-Party Hosting to In House hosting. I have all sites but one transferred. The last one I'm having issues with involves some plugins. I'm asking the plugin programmer for a new download, and was told that I have to export the database.
My question is: is there a way to export every concept of the database including Column Headers. I'm wanting to export the whole database, so when I import it into my SQL Server I don't have to do anything, just go into WordPress import the setups for it.

If you already have access to your current database phpMyAdmin
Log in to it
Select the desired database from the left menu
You should see an Export tab in the right panel, click it
In Export Method you can leave it as Quick
Export it as SQL
Press GO (the submit button)
If you happen to have any problem downloading the export, try using the custom method and selecting one compression (gzipped for example) method.
Then, importing the database is the inverse process into your new Database.
Login to your new database phpMyAdmin
Select your newly created DB
Click Import tab
Select the file to upload
Go
Make sure your new database is EMPTY if you want to migrate ALL THE TABLES. If you want to just migrate a few tables, you can select them in the custom method and then import only those.
Make sure you are running the same Wordpress files with your DB data, or you may experience many inconsistencies.

The primary issue was fixed with a new download of the plugin.

Related

How do I merge two Wordpress SQL databases in phpmyadmin?

I do not want to manually type in thousands of posts from my old website on the front end of my new website. I simply want to merge the database from the old into the new website in phpmyadmin. I'll tweak the tables to suit the new software afterwards.
I think there are only four tables that need to be merged for my purposes: wp_postmeta, wp_posts, wp_usermeta and wp_users.
The old website is still live, and the most recent post is post_id 28,556. So to be safe and neat, I want all my new website post ids to begin at 30,000.
I found this code which is sort of what I'm looking for, but not really: https://gist.github.com/jazzsequence/99dbee218c1b9a84df0d. This code simply adds +1 to every row, ignoring all associations with usermeta, users, post_ids inside postmeta etc. It cannot be used.
If you are unable to answer the question in it's entirety (it will help thousands of wordpress users if you do it properly), please tell me how to add 30,000 to every value in a given column. eg. If the column is called ID and the existing values are 1,2,4,9,13,24,25,26,28, then they would become 30001,30002,30004,30009,30013,30024,30025,30026,30028.
This might only partially answer the question as it might not allow you to do it manually, but actually I wouldn't recommend it.
People already worked on this export - import logic, tested it and wrote plugins for that. I would suggest to use them instead of trying to write it all over again yourself.
Just backup your databases and use plugins such as: https://wordpress.org/plugins/wp-exporter/
I would do a google search and find the best export / import plugin that does exactly what you want, there are many of them out there for free.
For the last part of your question, I think
UPDATE `table` SET `ID` = 30000+`ID`
should be enough.
So if you want to combine two MySQL databases in WordPress quickly and easily, then you should read my blog post: 8 Simple Steps to Merge Two WordPress MYSQL Databases
Here, we will stumble upon the eight simple steps that will help you merge two MySQL WordPress databases in a matter of few minutes.
Let’s begin the PROCESS:
Step 1: Create Two New WordPress Installs in a Sub-folder.
In case your old site is not hosted, then you need to get it setup and running either in a subfolder on your server or locally on your PC using MAMP. Also, set up two new installs of WordPress for two different purposes:
To host the old WP database that you want to import, and
To create an exact copy of your existing WP site.
Step 2: Log into the database of your old WP site
oldIf you want to log into your old site’s database, you need to emulate the following process:
Go to wp_users in phpMy Admin.
Change the password (if you know which account was the site’s admin)
Click Edit next to their name and enter the new password in the user_pass field.
Select the MD5 from the drop-down menu to the left.
And hit the Go button to get the things done.
Step 3: Install WordPress Export tool
exportInstalling the WordPress export tool is as simple as clicking a button. All you need to do is to go to the Tools, click on the “Export” button, and install WP’ export tool.
Step 4: Select data and download export file
downloadThis step is all about selecting certain data/sections that you want to export. It may include multiple files. Once selecting the desired files, you’ll need to click on Download Export File button.
Step 5: Log into your copy of current WordPress site
Under this step, you need to log into your copy of your current WordPress website.
Step 6: Install the WordPress Import tool
To install WordPress Import tool, you first need to go to the tools in your settings option and click on the Import option.
Step 7: Select “WordPress”
Step 8: Select the created data file and import it
If everything combines perfectly into the test copy of your WordPress site, you can freely import the data into your actual site.
There is a new plugin : Versionpress (https://versionpress.com/open-source/).
You should manually install this plugin in your two wordpress websites. this plugin create a .ini files and it can merge your 2 databases

I have copied database folder from wamp/bin/mysql/data

I have copied database folder from wamp/bin/mysql/data
As I open the phpMyAdmin, I see the database name, but when I click on them it is empty, as if no table has been created in them.
Where are my tables now? thanks
Copying the MySQL data directory is not a reliable means of backing up or moving your databases. The supported means is to export then import on the new server. There are a number of things that can go wrong, especially if you have InnoDB type tables.
The basic things you can check are file permissions on the new data directory, MySQL-level user permissions (assuming you're not already logged in as an administrative user, try doing so and see if things improve), and looking in the MySQL error log for any hints if there's something obvious, but it's very likely that something didn't transfer well.
I recommend that you go back to the original installation, verify your data, do a complete export (or "dump") to SQL format, then import that file to your new server.

MySQL data transfer/update to another database

I have a forum which is here or http://neue.st/index.php
and I want to transfer the data from that forum to a new forum in a different directory http://neue.st/forums
I also only want to have select pieces of data to be transfered such as users, posts, topics, forums but not things like themes & mods
I am doing this because I kinda of screwed up the data for mods & themes for the original forum & have no idea how to reverse it because I forgot to do the backuping
Is there anyway to do this with phpmyadmin
A good tool to use... but not absolutely necessary is PMA (phpMyAdmin). You should log in, click on the database you want to export data from and then click the export button.
You can see there is a "custom" choice, upon selecting that you will be presented with more options including the ability to choose which tables you need to export.
After that, head on over to your other database and import the SQL file that was generated/downloaded and happy days.
you can use SQLYog community edition, it is easy to select what ever data you want to export.
If you download the Support toolkit from phpBB you are able to 'clean' the database of all non standard tables and rows (i.e. things added by MODs), leaving you with a clean database.
For themes that you no longer need, you can delete and uninstall these via your Admin control panel before removing them from your server.
If you just use 'selected' parts of your database then chances are it won't work properly because there are so many relationships between the different tables.

How to upload data from zip file to MySQL database using phpMyAdmin?

I have a client who got a zipped file that has all the database they had in the SaaS app they were using. Now, we have a similar app but our column names are different (obviously) and in some cases we have less columns. So, now i want to upload all this data to my database but i am not sure how to do it?
I run phpmyadmin on the servers.
Extract the file on your desktop.
Login to your phpMyAdmin account.
Click the Import tab.
Select the file to import, file format, ect. and click Go.
Browse through the structure of the imported database to the columns of interest. For each column, click the pencil icon to edit the column (i.e. rename it), or click the X icon to delete it.
To merge data sets, after importing the tables, you would need to run your own query in the SQL tab to merge the data sets.
That are two different tasks in one question,
phpMyAdmin is able to import ZIP-files directly – you don't need to extract them on your local machine. Also be aware of max upload sizes and maximum script execution times, when importing huge database dumps.
To map an existing database to another structure involves a lot of manual work, like renaming tables and columns and copying data from on table to another.I would suggest, you import the old/original database to some "working copy" database and have your new database separate. That way you can use MySQL-features (INSERT INTO new_db.YX … SELECT XY_a FROM old_db.XY) to copy the data where it should go.
Well first you need to take a look at the data files and see how the columns/tables differ. After you sort that out you can go about about figuring out how it insert the data. If the files are large and there are quite a few i wouldnt use phpmyadmin. I'd ssh into the box and use the command line client or set the DB up for remote access and use a local copy of the client.
If youre lucky you won't have to do any processing on the data and you just map values from the old columns to the new columns as part of you LOAD DATA INFILE statement. Whatever you do youll want to test all this on a dummy db(s) first before you go running it in a live environment.

How to generate the whole database script in MySQL Workbench?

I want to take the whole database. Where do I find the database file?
And is there a way to write the whole database with all data to a text file (like the one in SQL Server)?
How to generate SQL scripts for your database in Workbench
In Workbench Central (the default "Home" tab) connect to your MySQL instance, opening a SQL Editor tab.
Click on the SQL Editor tab and select your database from the SCHEMAS list in the Object Browser on the left.
From the menu select Database > Reverse Engineer and follow the prompts. The wizard will lead you through connecting to your instance, selecting your database, and choosing the types of objects you want to reverse engineer.
When you're all done, you will have at least one new tab called MySQL Model. You may also have a tab called EER Diagram which is cool but not relevant here.
Click in the MySQL Model tab
Select Database > Forward Engineer
Follow the prompts. Many options present themselves, including Generate INSERT Scripts for Tables which allows you to script out the data contained within your tables (perfect for lookup tables).
Soon you will see the generated script in front of you. At this point you can Copy to Clipboard or Save to Text File.
The wizard will take you further, but if you just want the script you can stop here.
A word of caution: the scripts are generated with CREATE commands. If you want ALTER you'll have to (as far as I can tell) manually change the CREATEs to ALTERs.
This is guaranteed to work, I just did it tonight.
Q#1: I would guess that it's somewhere on your MySQL server?
Q#2: Yes, this is possible. You have to establish a connection via Server Administration. There you can clone any table or the entire database.
This tutorial might be useful.
EDIT
Since the provided link is no longer active, here's a SO answer outlining the process of creating a DB backup in Workbench.
In MySQL Workbench 6, commands have been repositioned as the "Server Administration" tab is gone.
You now find the option "Data Export" under the "Management" section when you open a standard server connection.
there is data export option in MySQL workbech
I found this question by searching Google for "mysql workbench export database sql file". The answers here did not help me, but I eventually did find the answer, so I am posting it here for future generations to find:
Answer
In MySQLWorkbench 6.0, do the following:
Select the appropriate database under MySQL Connections
On the top-left hand side of screen, under the MANAGEMENT heading, select "Data Export".
Here is a screenshot for reference:
None of these worked for me. I'm using Mac OS 10.10.5 and Workbench 6.3. What worked for me is Database->Migration Wizard... Flow the steps very carefully
In the top menu of MySQL Workbench click on database and then on forward engineer. In the options menu with which you will be presented, make sure to have "generate insert statements for tables" set.
Try the export function of phpMyAdmin.
I think there is also a possibility to copy the database files from one server to another, but I do not have a server available at the moment so I can't test it.
Using Windows 10 and MySql Workbench 8.0
Go to Server tab
Go to Database Export
This opens up something like this
Select the schema to export in the Tables to export
Click the button Start Export
Surprisingly the Data Export in the MySql Workbench is not just for data, in fact it is ideal for generating SQL scripts for the whole database (including views, stored procedures and functions) with just a few clicks. If you want just the scripts and no data simply select the "Skip table data" option. It can generate separate files or a self contained file. Here are more details about the feature: http://dev.mysql.com/doc/workbench/en/wb-mysql-connections-navigator-management-data-export.html
in mysql workbench server>>>>>>export Data
then follow instructions it will generate insert statements for all tables data each table will has .sql file for all its contained data