How to insert large databases straight in your MySQL server using the console.
This is a simple process that I usually forget, every time I have to upload big databases and insert them on MySQL I always try it all first and then only I remember to run the commands from the shell, I have no idea why this happen, it should be the first thing to keep in mind but I always forget.
For those with my same problem or the ones that don’t know about it, here is the easiest way to insert large databases on MySQL via shell.
First back it up from your local server, if you use phpMyAdmin there is an easy way to export all info from it, as an SQL file and store it on your computer, once this is done just FTP the SQL file to your server, login on it and use the following command. (You need to have the database already configured)
# cd /home/folder_where_the_SQL_file_was_uploaded # mysql –udatabase_user_name -p database_name < my_uploaded_file.sql
After this MySQL will ask for the database password, just enter it and hit enter on your keyboard… AND done, you have your large database inserted in your server in a minimum amount of time.
Hope this help… Stay tuned for more info and codes!
Categories
Archives
- July 2017 (1)
- May 2015 (1)
- November 2013 (2)
- August 2013 (1)
- September 2012 (3)
- June 2012 (1)
- May 2012 (4)
Tags Cloud
Android APC APC Cache bash Blackberry CentOS clamscan co cpanel databases HTML 5 install memcache iPhone linux load balanced servers memcache Memcached memcahed sessions MySQL PHP php sessions Server Cache shell ssh sticky notes available text formats sticky notes commands Sticky Notes format viruses webOS website antivirus website infections