Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



Import sql file in mysql

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 18-11-2009
Member
 
Join Date: Apr 2009
Posts: 87
Import sql file in mysql

I have created database named employee database and i want to import MySQL dumpfile into my employee database? what are the syntax used while importing file. Any recommendations and suggestions are appreciated.
Reply With Quote
  #2  
Old 18-11-2009
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: Import sql file in mysql

Import the dump file into MySQL by typing all the following on 1 single line at the shell prompt: mysql -p -h DBSERVER dbname < employee.sql The above assumes that your database name on our system is "dbname" and the dumpfile that you uploaded was named "employee.sql".
Reply With Quote
  #3  
Old 18-11-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Import sql file in mysql

You can easily restore or import MySQL data with mysql command itself. The easiest way is to split the original sql file into manageable blocks... a separate file for each table maybe since your data base is so large. You can do this manually from the file that you already have... or export the original sql in blocks as separate files.
Reply With Quote
  #4  
Old 18-11-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Import sql file in mysql

Using the phpMyAdmin authoring tool you can easily import/add an existing database to your current database. If the .sql file that you are attempting to import is too large, the import via phpMyAdmin may timeout in your browser. An alternative way to import your .sql file is to run the import command via a SSH session. The only restriction is that this file has to be of either .SQL or .PHP type. If your database file is of a different type, you will need first to convert it before importing to phpMyAdmin.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Import sql file in mysql"
Thread Thread Starter Forum Replies Last Post
mysql config file in MySQL Netorious Software Development 4 18-03-2010 10:43 PM
Navicat : Import Data into MySQL Martien Windows Software 4 22-01-2010 12:56 PM
Mysql Error : Can't connect to local mysql server through socket ' var lib mysql mysql.sock' 2 roshan45 Software Development 3 07-11-2009 09:36 PM
How to import mysql database into sharepoint RasMus Windows Software 3 11-06-2009 02:41 PM
Import txt file to mysql Holt Software Development 2 21-04-2009 12:48 PM


All times are GMT +5.5. The time now is 04:04 AM.