media Posted June 4, 2015 Posted June 4, 2015 Before upgrading 4.0 I am trying to move my board to a better server (I am still on 3.4.8)Old server: Centos, WebminNew server: Centos, CpanelI have tried to move with phpmyadmin, no success...I tried every possible way to complete the job, but no luck....I am able to download the database, but when I try to upload to new server with phpmyadmin, after certain number of records, it does not upload anymore....I have edited PHP post size and upload size on CPanel to 2047 Mb....But somehow on phpmyadmin is not allowing after certain amount of records to be uploaded, anyone have a solution for this????Only uploads about 2 gig and then stop without warningAnyone knows any solution please let me know
media Posted June 4, 2015 Author Posted June 4, 2015 Do you have SSH access?Yes I do; I have Putty on my Windows to connect with....
Konrad Dąbek Posted June 4, 2015 Posted June 4, 2015 Maybe try to MySQL Workbench: http://dev.mysql.com/downloads/workbench/Pretty easy and straightforward app, only disadvantage (for me) is that MySQL Workbench does not show any detailed progress. Dumping big database on slow connection can take ~30 mins.
sijad Posted June 4, 2015 Posted June 4, 2015 Yes I do; I have Putty on my Windows to connect with....login to ssh, then run this:mysql -u {username} -p {databasename} < path_to_file.sqlanother option could be http://www.mysqldumper.net/but ssh way is faster and more stable
media Posted June 5, 2015 Author Posted June 5, 2015 login to ssh, then run this:mysql -u {username} -p {databasename} < path_to_file.sqlanother option could be http://www.mysqldumper.net/but ssh way is faster and more stable Sijad,Is that code for export or import???? Because I have to export first and then import to the new server...Thanks
Rhett Posted June 5, 2015 Posted June 5, 2015 mysqldump via ssh is the only good method for a large database and restore the same vai, via ssh.
sijad Posted June 5, 2015 Posted June 5, 2015 Sijad,Is that code for export or import???? Because I have to export first and then import to the new server...ThanksIt's for import, please remember you can use your PHPMYADMIN exported backup for importing too but if you want export a new backup you can use mysqldump via ssh (in your old server):mysqldump -u {username} -p {databasename} | gzip > backup.sql.gzfor copy backup to new server you can use scp ('~' is the path to {new_server_username} home directory you can change it to somewhere else if you wish):scp backup.sql.gz {new_server_username}@{new_server_ip_address}:~ login to new server via ssh then run:gunzip backup.sql.gz && mysql -u {username} -p {databasename} < backup.sql
RevengeFNF Posted June 5, 2015 Posted June 5, 2015 What i alwasy use is:Export the database in the old server:mysqldump -u {user} -p{password} {database} > backup.sqlI then transfer the backup.sql to the new server and then:mysql -u {user} -p{password} {database} < backup.sqlEasy.
不中用 Posted June 5, 2015 Posted June 5, 2015 .and use gzip or other zip like compression !! It will make a big difference ..like this .. $ mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz] .
media Posted June 5, 2015 Author Posted June 5, 2015 mysqldump -u {user} -p{password} {database} > backup.sqluser? MySQL? or database owner?Where does this query save the backup.sql file?mysql -u {user} -p{password} {database} < backup.sqlSame question from here toouser?where am I going to put that backup.sql file to upload it to new server?????
不中用 Posted June 5, 2015 Posted June 5, 2015 mysqldump -u {user} -p{password} {database} > backup.sqluser? MySQL? or database owner?Where does this query save the backup.sql file?mysql -u {user} -p{password} {database} < backup.sqlSame question from here toouser?where am I going to put that backup.sql file to upload it to new server?????.ohh oooooooooooooooooohhhhYou have Linux access to your server ? Or how you are accessing your MySQL server ? .
RevengeFNF Posted June 5, 2015 Posted June 5, 2015 mysqldump -u {user} -p{password} {database} > backup.sqluser? MySQL? or database owner?Where does this query save the backup.sql file?mysql -u {user} -p{password} {database} < backup.sqlSame question from here toouser?where am I going to put that backup.sql file to upload it to new server?????In shh you enter in the folder you want. That command will use that folder.user and password, is the user login for your mysql.
media Posted June 5, 2015 Author Posted June 5, 2015 In shh you enter in the folder you want. That command will use that folder. user and password, is the user login for your mysql. Thank you, I will try and let you guys know what happen...
media Posted June 9, 2015 Author Posted June 9, 2015 Ok guys finally done...But I did it in a different way, after the ideas you guys gave me here, I researched a little bit and found thisBackup a local database and restore to remote server using single command:[local-server]# mysqldump -u root -ptmppassword sugarcrm | mysql \ -u root -ptmppassword --host=remote-server -C sugarcrm1 [Note: There are two -- (hyphen) in front of host]It did the trick....
Xelphos Posted June 18, 2015 Posted June 18, 2015 Ok guys finally done...But I did it in a different way, after the ideas you guys gave me here, I researched a little bit and found thisBackup a local database and restore to remote server using single command:[local-server]# mysqldump -u root -ptmppassword sugarcrm | mysql \ -u root -ptmppassword --host=remote-server -C sugarcrm1 [Note: There are two -- (hyphen) in front of host]It did the trick....Interesting, I have always done it via:To backup:mysql -u(database_username) -p(database_user_password) (forum_database) < forum_backup.sqlAnd to restore:mysql -u(database_username) -p(database_user_password) (forum_database) > forum_backup.sql The .sql dump will be saved in the same directory that you are currently running the command in. In my case /home/(my_username). Restoring is basically the same process, just make sure the .sql file is in the same directory you are running the command in.
RevengeFNF Posted June 18, 2015 Posted June 18, 2015 For the backup is better to use mysqldump instead of mysql.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.