<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Import MySQL Dumpfile, SQL Datafile Into My Database</title> <atom:link href="http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: EJTH</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-67530</link> <dc:creator>EJTH</dc:creator> <pubDate>Tue, 24 Jan 2012 14:12:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-67530</guid> <description>As i stated in my previous comment this method is more correct, and works better on large database dumps:
# mysql -h localhost -u [mysqlusername]
Enter password: [your pass]
Then type in:
use database_name
source dump.sql</description> <content:encoded><![CDATA[<p>As i stated in my previous comment this method is more correct, and works better on large database dumps:</p><p># mysql -h localhost -u [mysqlusername]<br
/> Enter password: [your pass]</p><p>Then type in:<br
/> use database_name<br
/> source dump.sql</p> ]]></content:encoded> </item> <item><title>By: waqas</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-67525</link> <dc:creator>waqas</dc:creator> <pubDate>Tue, 24 Jan 2012 13:00:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-67525</guid> <description>Tried everything, I am having the following error while importing a mysql db dump on command line. the file is around over 300 MB. I have imported the same file in centos a while ago. But now having this problem. Any help plz, I can&#039;t change the db dump file.
&quot;error 1064 (42000) you have an error in your sql syntax; check the manual that corresponds to your mysql server version.&quot;
thanks</description> <content:encoded><![CDATA[<p>Tried everything, I am having the following error while importing a mysql db dump on command line. the file is around over 300 MB. I have imported the same file in centos a while ago. But now having this problem. Any help plz, I can&#8217;t change the db dump file.</p><p>&#8220;error 1064 (42000) you have an error in your sql syntax; check the manual that corresponds to your mysql server version.&#8221;</p><p>thanks</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-66449</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Fri, 06 Jan 2012 11:05:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-66449</guid> <description>The commands are same. Let us say your table name is &lt;strong&gt;page&lt;/strong&gt;, database name is &lt;strong&gt;wikidb&lt;/strong&gt; and dump file is called &lt;strong&gt;page.sql&lt;/strong&gt;. To import page.sql into wikidb.page table type:
&lt;pre&gt;mysql -u root -h localhost -p wikidb &lt; page.sql&lt;/pre&gt;
The above command will delete all data from page table and will import a new set of data from page.sql.
Hope this helps!</description> <content:encoded><![CDATA[<p>The commands are same. Let us say your table name is <strong>page</strong>, database name is <strong>wikidb</strong> and dump file is called <strong>page.sql</strong>. To import page.sql into wikidb.page table type:</p><pre>mysql -u root -h localhost -p wikidb < page.sql</pre><p>The above command will delete all data from page table and will import a new set of data from page.sql.</p><p>Hope this helps!</pre> ]]></content:encoded> </item> <item><title>By: PHP Redstorm</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-66448</link> <dc:creator>PHP Redstorm</dc:creator> <pubDate>Fri, 06 Jan 2012 10:12:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-66448</guid> <description>It was really helpful to import database using command line.
Thank you very much ;-)
Keep Posting!!!</description> <content:encoded><![CDATA[<p>It was really helpful to import database using command line.</p><p>Thank you very much ;-)</p><p>Keep Posting!!!</p> ]]></content:encoded> </item> <item><title>By: Justin DoCanto</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-66440</link> <dc:creator>Justin DoCanto</dc:creator> <pubDate>Fri, 06 Jan 2012 04:18:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-66440</guid> <description>forgot how to do this off the top of my head. this post came up on google. just saved my ass. thanks guys</description> <content:encoded><![CDATA[<p>forgot how to do this off the top of my head. this post came up on google. just saved my ass. thanks guys</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-65161</link> <dc:creator>John</dc:creator> <pubDate>Sun, 04 Dec 2011 11:38:54 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-65161</guid> <description>Same here. phpmyadmin needed 10 mins. And now...well below 3 seconds. So awesome.</description> <content:encoded><![CDATA[<p>Same here. phpmyadmin needed 10 mins. And now&#8230;well below 3 seconds. So awesome.</p> ]]></content:encoded> </item> <item><title>By: Luis Santana</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-64206</link> <dc:creator>Luis Santana</dc:creator> <pubDate>Mon, 07 Nov 2011 18:38:03 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-64206</guid> <description>/bin/mysql [Database Name] &lt; /home/sandeep/software/[file-name].sql
That is the proper command</description> <content:encoded><![CDATA[<p>/bin/mysql [Database Name] &lt; /home/sandeep/software/[file-name].sql</p><p>That is the proper command</p> ]]></content:encoded> </item> <item><title>By: Sean P. O. MacCath-Moran</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-63309</link> <dc:creator>Sean P. O. MacCath-Moran</dc:creator> <pubDate>Sat, 08 Oct 2011 23:45:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-63309</guid> <description>Thanks Ejth - I was scouring the web for a large file solution and had completely forgot about this approach; your refresher was timely and HUGELY helpful. =o)</description> <content:encoded><![CDATA[<p>Thanks Ejth &#8211; I was scouring the web for a large file solution and had completely forgot about this approach; your refresher was timely and HUGELY helpful. =o)</p> ]]></content:encoded> </item> <item><title>By: florin</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62878</link> <dc:creator>florin</dc:creator> <pubDate>Tue, 27 Sep 2011 17:57:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62878</guid> <description>Just wanna thank EJTH - only his method worked for me.
Thanks,</description> <content:encoded><![CDATA[<p>Just wanna thank EJTH &#8211; only his method worked for me.<br
/> Thanks,</p> ]]></content:encoded> </item> <item><title>By: Rajgopal H.G.</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62672</link> <dc:creator>Rajgopal H.G.</dc:creator> <pubDate>Thu, 22 Sep 2011 11:37:03 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62672</guid> <description>Thanks a lot. I was missing the -h in the command
$ mysql -u username -p -h localhost data-base-name &lt; data.sql</description> <content:encoded><![CDATA[<p>Thanks a lot. I was missing the -h in the command<br
/> $ mysql -u username -p -h localhost data-base-name &lt; data.sql</p> ]]></content:encoded> </item> <item><title>By: magi</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62392</link> <dc:creator>magi</dc:creator> <pubDate>Tue, 13 Sep 2011 09:19:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62392</guid> <description>How can I make a sql file, where is stored my database, using mysql command line?
Thanks.</description> <content:encoded><![CDATA[<p>How can I make a sql file, where is stored my database, using mysql command line?<br
/> Thanks.</p> ]]></content:encoded> </item> <item><title>By: Trajcevski Filip</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62362</link> <dc:creator>Trajcevski Filip</dc:creator> <pubDate>Mon, 12 Sep 2011 07:48:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62362</guid> <description>You have to get the mySql dump file.
Option 1:
-Copy the dump file to MySql instalation directory\MySql Server x.x\bin
-Open command prompt, and go to MySql instalation directory\MySql Server x.x\bin directory.
-Run &quot;mysql -uroot -ppassword databaseName &lt; dumpFileName.sql&quot;
IMPORTANT: dont leave spaces between -u and user or -p and password...
Option 2:
-add mysql from MySql instalation directory\MySql Server x.x\bin to system enviorment variables
-Open command prompt and go to the directory where your dump file is
-Run &quot;mysql -uroot -ppassword databaseName &lt; dumpFileName.sql&quot;
IMPORTANT: dont leave spaces between -u and user or -p and password...</description> <content:encoded><![CDATA[<p>You have to get the mySql dump file.<br
/> Option 1:<br
/> -Copy the dump file to MySql instalation directory\MySql Server x.x\bin<br
/> -Open command prompt, and go to MySql instalation directory\MySql Server x.x\bin directory.<br
/> -Run &#8220;mysql -uroot -ppassword databaseName &lt; dumpFileName.sql&quot;<br
/> IMPORTANT: dont leave spaces between -u and user or -p and password&#8230;<br
/> Option 2:<br
/> -add mysql from MySql instalation directory\MySql Server x.x\bin to system enviorment variables<br
/> -Open command prompt and go to the directory where your dump file is<br
/> -Run &quot;mysql -uroot -ppassword databaseName &lt; dumpFileName.sql&quot;<br
/> IMPORTANT: dont leave spaces between -u and user or -p and password&#8230;</p> ]]></content:encoded> </item> <item><title>By: EJTH</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62252</link> <dc:creator>EJTH</dc:creator> <pubDate>Thu, 08 Sep 2011 09:24:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62252</guid> <description>use this approach instead, as i mentioned in my previous post the method mentioned in this article has problems with huge imports:
mysql -h localhost -u [mysqlusername]
Enter password: [your pass]
use database_name
source dump.sql</description> <content:encoded><![CDATA[<p>use this approach instead, as i mentioned in my previous post the method mentioned in this article has problems with huge imports:</p><p>mysql -h localhost -u [mysqlusername]<br
/> Enter password: [your pass]<br
/> use database_name<br
/> source dump.sql</p> ]]></content:encoded> </item> <item><title>By: joomlavui</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62249</link> <dc:creator>joomlavui</dc:creator> <pubDate>Thu, 08 Sep 2011 08:39:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62249</guid> <description>ERROR 1153 (08S01) at line 17005: Got a packet bigger than &#039;max_allowed_packet&#039; bytes</description> <content:encoded><![CDATA[<p>ERROR 1153 (08S01) at line 17005: Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes</p> ]]></content:encoded> </item> <item><title>By: mohsen</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-62117</link> <dc:creator>mohsen</dc:creator> <pubDate>Sat, 03 Sep 2011 08:26:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-62117</guid> <description>Thank you for the guidance.
It seems what really works is
mysql -u user -ppassword
and not
mysql -u user -p password
I hope the author can change the initial document. It took me about 30 minutes to understand I should remove the space</description> <content:encoded><![CDATA[<p>Thank you for the guidance.<br
/> It seems what really works is<br
/> mysql -u user -ppassword<br
/> and not<br
/> mysql -u user -p password</p><p>I hope the author can change the initial document. It took me about 30 minutes to understand I should remove the space</p> ]]></content:encoded> </item> <item><title>By: mtg169</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-59726</link> <dc:creator>mtg169</dc:creator> <pubDate>Tue, 31 May 2011 20:52:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-59726</guid> <description>use mysql -u username -p databasename &lt;file_new.sql
That will prompt you for the password and is more secure as the password will not be stored in plain-text in your bash history. If you want to supply the password, simply remove the space after -p and the the password, so -pyourpassword.</description> <content:encoded><![CDATA[<p>use mysql -u username -p databasename &lt;file_new.sql<br
/> That will prompt you for the password and is more secure as the password will not be stored in plain-text in your bash history. If you want to supply the password, simply remove the space after -p and the the password, so -pyourpassword.</p> ]]></content:encoded> </item> <item><title>By: bunty</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-59630</link> <dc:creator>bunty</dc:creator> <pubDate>Thu, 26 May 2011 08:12:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-59630</guid> <description>i used &quot;mysql -u username -p pass databasename &lt;  file_new.sql&quot;
and found error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near..
please help</description> <content:encoded><![CDATA[<p>i used &#8220;mysql -u username -p pass databasename &lt;  file_new.sql&quot;</p><p>and found error</p><p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near..</p><p>please help</p> ]]></content:encoded> </item> <item><title>By: Ejth</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-59513</link> <dc:creator>Ejth</dc:creator> <pubDate>Thu, 19 May 2011 14:12:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-59513</guid> <description>DO NOT direct the contents of a large SQL dump to mysql with like in this article:
mysql -u username -p -h localhost data-base-name &lt; data.sql
This will probably fail if your database is huge (like mine, its about 1.5gb)
instead use this approach:
mysql -h localhost -u [mysqlusername]
Enter password: [your pass]
use database_name
source dump.sql
This will handle huge files with no problems.</description> <content:encoded><![CDATA[<p>DO NOT direct the contents of a large SQL dump to mysql with like in this article:<br
/> mysql -u username -p -h localhost data-base-name &lt; data.sql</p><p>This will probably fail if your database is huge (like mine, its about 1.5gb)</p><p>instead use this approach:</p><p>mysql -h localhost -u [mysqlusername]<br
/> Enter password: [your pass]<br
/> use database_name<br
/> source dump.sql</p><p>This will handle huge files with no problems.</p> ]]></content:encoded> </item> <item><title>By: Farshid</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-56717</link> <dc:creator>Farshid</dc:creator> <pubDate>Wed, 30 Mar 2011 21:22:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-56717</guid> <description>Thanks. This was very helpful. A quick reminder.
Do keep up the good work.</description> <content:encoded><![CDATA[<p>Thanks. This was very helpful. A quick reminder.<br
/> Do keep up the good work.</p> ]]></content:encoded> </item> <item><title>By: vikas gautam</title><link>http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/#comment-55930</link> <dc:creator>vikas gautam</dc:creator> <pubDate>Wed, 23 Feb 2011 07:27:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/import-mysql-dumpfile-sql-datafile-into-my-database.php#comment-55930</guid> <description>thank for hte information but where is the script</description> <content:encoded><![CDATA[<p>thank for hte information but where is the script</p> ]]></content:encoded> </item> </channel> </rss>
