in Education by
I have a .sql file with an export from phpMyAdmin. I want to import it into a different server using the command line. I have a Windows Server 2008 R2 installation. I placed the .sql file on the C drive, and I tried this command database_name < file.sql It is not working I get syntax errors. How can I import this file without a problem? Do I need to create a database first? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Try this command line in MYSQL: MySQL -u username -p database_name < file1.sql Are you interested in learning SQL from scratch! Have a look at this interesting video on SQL provided by Intellipaat: Note: It’s most recommended to use the full path of the SQL file file1.sql I If an empty database doesn’t exist and exported SQL don’t contain CREATE DATABASE(-n option or exported with - -no—create- -db ) then you may have to create one empty database before you import it. <!--[endif]-->You can use - -triggers and -R to keep the triggers of the original database. They will not be copied by default.

Related questions

0 votes
    How can I reset the AUTO_INCREMENT of a field? I want it to start counting from 1 again. Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
0 votes
    How do I import other files in Python? How exactly can I import a specific python file like import file.py? How ... gap from extra.py? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I am originally a C programmer. I have seen numerous tricks and "hacks" to read many different arguments. What are ... can do this? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I have file called q.r and it has chmod of 755, how can I run it using a command-line? sayHello...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    SELECT id, amount FROM report I need amount to be amount if report.type='P' and -amount if report.type='N' ... this to the above query? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    My goal is to merge tables from different schema into one single schema so I would like to execute this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    How to enable inno-db support on installed instance of MySql? I have installed mysql-5.0.67-win32. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    In my database I have some records where I am sorting by a column that contains identical values: | ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I want to use python to connect to a MySQL database, how can I do that? Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    Why does this mysql query fail? UPDATE accounts SET motivation = IF(motivation+100...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    I have some data that looks like this: C:10 R:200 N/A E:3 N/A N:77 I'm trying to ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    If I have a table with results like this: 0001400OL 0578400OL 354085OL 48679OL and if I wanted to replace ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I'm trying to install MySQL for Visual Studio 1.2.8 and Connector/NET 8.0.13 via MySQL Installer ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I've come to this code, but from this i have to manually insert all columns and check it by each ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I am trying to delete several rows from a MySQL 5.0.45 database: delete from bundle_inclusions; The client ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 26, 2022 in Education by JackTerrance
...