Project backup along with database to removable drive - mysql

I am developing with netbeans.
I am using MySql database.
I want to move my project on my another laptop.
But when i copy my project to removable drive i don't get database files with project.
Please tell me how to move whole project along with database files.
I am copying from hard disk, is that a problem???

You could use the export function from the open-source program "MySQL Workbench" and then import it on your laptop.
MySQL Workbench: http://www.mysql.com/products/workbench/
And how to use MySQL Workbench to export & import:
https://www.beastnode.com/portal/knowledgebase/48/MySQL-Workbench-Backup-and-Import-your-MySQL-Database.html

Related

Restoring wordpress site using .zip and .sql onto AWS

What is the best was to restore a website from a backup when all I have is a .zip file and a .sql file of the wordpress site migrating onto aws. So far I tried installing wordpress with a EC2 instance of wordpress and I was going to try and restore from the dashboard using a wordpress plugin. But no plugin I found can upload a .sql database like I thought. Which doesn't make much sense now that I really think about it. I am unsure if should I install a Microsoft SQL Server DB Instance in RDS or MySyl for the wordpress install? Please help so confused...
You can use that method:
Extract the wp-content folder and upload it.
Log onto your ec2 and use the mysql command line to import the database.
Update the siteurl and home in wp_options.

How to put MySQL database in project folder

I'm using Node.JS express and MySQL. Also I have XAMPP installed. Database is in folder C:\xampp\mysql\data\users now, but I want It to be in C:\...my-project\users so I can push it to github and other people could get it with all the other files. How can I move it to another folder and continue working with it on localhost?
Best way is to mysqldump your database.
Then you can mysqlimport your .sql file or simply execute in a sql query.
Also, working on plaintext sql template allows you to use version control.

Is it possible to copy a local MySQL database to a remote MySQL database?

Situation: I have 2 servers, one of them currently hosting a live WordPress site, and I want to be able to transfer the site to the other server in case the first server goes down. Transferring the source files is easy; transferring the database is what I need to figure out how to do. Both of the servers are Windows Server 2008.
Is there any easy to do this?
Simplest way would be to mysqldump the database, transfer it using the same mechanism you have for your source files, then import it into mysql.
Dump the primary database...
mysqldump -u user -p database > c:\somedir\backup.sql
...transfer the sql file...
Import on the failover...
mysql -u user -p database < c:\somedir\backup.sql
Both export and import can easily be scripted in batch files.
The easiest way that I know is using the plugin "Duplicator". I used it several times with Apache servers, but as is commented here, seems that three years ago it was running ok with Windows 2008 IIS 7, so I figure now it would be better.
Duplicator generates two packages: one with fields (where you can exclude uploads if needed) and the other with the database. Once you have the two packages, you need to upload into your new server and install the package. Of course you need the new database credentials. The plugin ask you in the las step for the new url base to make the adequate substitutions in all the database.

How to manually import database directly into the data folder in phpMyAdmin in XAMPP?

I recently installed a new version of XAMPP. I copied and pasted database folders from the old xampp's mysql/data to the same folder in the newer version. The database names are displayed in phpMyAdmin but it does not show any data.
I know I can do a simple import/export sql to resolve this but I'd like to know why copying and pasting the database folders not working? Do I have to do something else in order to make this work?
I'm going to backup my database regularly using an auto backup tool. Apart from backing up mysql/data folder, do I also need to backup some other folders or files to have a proper database backup?
why copying and pasting the database folders not working? >> as far as I know we need to use import feature, because it will register the database to mysql's infomation_schema.
So even if the database file is stored in the correct folder, it won't show up on the phpmyadmin because it's not registered. And I think mysql didn't do any directory scanning to determine it's database line up.
To back up automatically, there are several ways you can do. Moreover if you use linux OS, you have more freedom to do that, for example create a php script to backup your db and then execute it regulary by using cron job.
hope this can help you.

How can I copy a table from one database to another on the same server without shell (command line) access?

I do not use the Shell interface.
I have my own shared Linux server at SoftLayer with WHM and CPanel for my two joomla website installations.
I would like to start migrating populated tables from the old site to the new one.
BUT I don't know how to use shell access, and I prefer a graphical interface anyway.
I am working on installed extensions one at a time.
I saw a mention about MySQL Workbench 6.0.7
http://dev.mysql.com/downloads/tools/workbench/
but am unsure of it's operation on my server.
Any insight on making this task easier or more foolproof would be appreciated.
Export your tables from PHPMyAdmin on your cpanel, then import them to your new server via PHPMyAdmin too.