About 282,000 results
Open links in new tab
  1. How to import an SQL file using the command line in MySQL?

    Jul 16, 2013 · To dump a database into an SQL file use the following command. mysqldump -u username -p database_name > database_name.sql To import an SQL file into a database (make sure you are in the same directory as the SQL file or supply the full path to the file), do: mysql -u username -p database_name < database_name.sql

  2. mysqldump - How to import a .sql file in MySQL? - Database ...

    I am trying to import a .sql file using MySQL Workbench and I get this error: ERROR 1046 (3D000) at line 28: No database selected I have first created an empty database called with the same name as the .sql file but it doesn't work. I have also tried to do it with the mysql command client using: mysqldump -u root database > file.sql

  3. How can I import a database with MySQL from terminal?

    Dec 28, 2010 · Change to the database you want to use for importing the .sql file data into. Do this by typing: USE your_database_name Now locate the .sql file you want to execute. If the file is located in the main local C: drive directory and the .sql script file name is currentSqlTable.sql, you would type the following: \. C:\currentSqlTable.sql

  4. Import SQL file into mysql - Stack Overflow

    Mar 1, 2011 · I haven't created any tables there. But I have a SQL file which contains all the necessary data for the database. The file is nitm.sql which is in C:\ drive. This file has size of about 103 MB. I am using wamp server. I have used the following syntax in MySQL console to import the file: mysql>c:/nitm.sql; But this didn't work.

  5. How can I import data into mysql database via mysql workbench?

    Apr 8, 2013 · Regarding selection of the schema. MySQL Workbench (5.2.47 CE Rev1039) does not yet support exporting to the user defined schema. It will create only the schema for which you exported the .sql... In 5.2.47 we see "New" target schema. But it does not work. I use MySQL Administrator (the old pre-Oracle MySQL Admin beauty) for my work for backup ...

  6. mysql - How to export and import a .sql file from command line …

    Jul 10, 2012 · $ mysql -u username -p -h localhost DATA-BASE-NAME < data.sql In this example, import 'data.sql' file into 'blog' database using vivek as username: $ mysql -u vivek -p -h localhost blog < data.sql If you have a dedicated database server, replace localhost hostname with with actual server name or IP address as follows: $ mysql -u username -p -h ...

  7. How to easily import multiple sql files into a MySQL database?

    Jan 25, 2012 · puts multiple sql file into one file named as data.sql. cat /path/to/**/*.sql > data.sql enter into database(I will take a example Postgres, because I'm not so familar with Mysql) psql -U postgres \l # list all database \c database_name # connect database \i …

  8. Importing larger SQL files into MySQL - Stack Overflow

    I have a 400 MB large SQL backup file. I'm trying to import that file into MySQL database using WAMP → import, but the import was unsuccessful due to many reasons such as upload file size is too large and so on. So, I've gone ahead and made a few changes to the configuration of PHP and MySQL settings under WAMP.

  9. importing sql file into a database using wamp - Stack Overflow

    Oct 11, 2014 · The easiest way to import a sql file into a database in WAMP, using command line is as follows: 1. Open Command Prompt (CMD - DOS) get into the mysql folder, which in my case works like this C:\> cd C:\wamp\bin\mysql\mysql5.0.51b\bin 2. Then use this command to fire up MySQL This line basically connects you to the mysql database of your choice.

  10. Importing a .sql file into mysql - Stack Overflow

    Apr 28, 2018 · I downloaded MySQL Versio 8.0 and want to open this file in MySQL workbench. I tried opening the .sql file through MySQL workbench but it ended with errors and did not export all the tables, so I tried the following commands on MySQL 8.0 command line client. Use database_name; SOURCE filepath\filename.sql; The .sql file is 500 mb. It contains ...

Refresh