hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Mysql dumping problem
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Mysql dumping problem

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-20-2004, 01:54 PM
Cuper Cuper is offline
Newbie
 
Join Date: Aug 2003
Posts: 27

Mysql dumping problem


Hello guys,

I'm trying to dump a large database (360 mb) through shell by using this command :

mysqldump -u username -p dbname > dbname.sql

after doing this command everything went ok and the sql file created , then i connect to the site through ftp and moved the sql file to the new server .

the problem is that when i want to dump this file again in the new database by using this command :

mysql -u myname -pmypassword dbname < dbname.sql

an error show and says that there is an error in a specified line .


i want to know if there is any dump command that can dump the file directly with ignoring any line that can be an error or problem .

Thanks

Reply With Quote


Sponsored Links
  #2  
Old 02-21-2004, 10:44 AM
nipl nipl is offline
Web Hosting Master
 
Join Date: Feb 2003
Posts: 799
mysql -f -s -uusername -p dbname < script.sql

Reply With Quote
  #3  
Old 02-21-2004, 11:10 AM
sehe sehe is offline
Web Hosting Master
 
Join Date: Jun 2003
Posts: 962
while importing use the -f option (see above)
-f, --force Continue even if we get an sql error.

Reply With Quote
Sponsored Links
  #4  
Old 02-24-2004, 08:06 AM
Brightadmin Brightadmin is offline
Web Hosting Master
 
Join Date: Feb 2004
Posts: 772
Hi,

As already provided solution by Sehe & nipl -

You can use the mysql command in the following way
mysql -f -u username -p dbname < dbname.sql
The -f option with mysql specifies to continue even if you get an sql error. It will good to rectify the error before dumping the database. You can post the error if you need any help in rectifying it.

Regards,



Reply With Quote
  #5  
Old 02-24-2004, 11:53 PM
nmluan nmluan is offline
Web Hosting Master
 
Join Date: Jan 2002
Posts: 1,034
When dumping try the "--opt" switch (mysqldump --opt -u user...), it tends to create a smaller and "better" output file.

__________________
ML

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
Web Hosting Sales and Promos Roundup - October 7, 2011 Web Hosting News 2011-10-07 19:56:18
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?