Mysqldump was used to create a single schema backup;
Shell> mysqldump –u root –p sakila > sakila2013.sql
Which two commands will restore the sakila database without interfering with other running
database?
A.
Mysql> USE sakila; LOAD DATA INFILE ‘sakila2013.sql’;
B.
Shell> mysql –u root –p sakila sakila2013.sql
C.
Shell> mysql import –u root –p sakila sakila2013.sql
D.
Shell> mysql –u root -p –e ‘use sakila; source sakila2013.sql’
E.
Shell> mysql –u root –p –silent < sakila2013.sql
Explanation:
Reference: http://mysql.livejournal.com/133572.html
Incomplete and wrong.
D, E.
D is sure
And why not B?
In B is missing < or in E -silent is sakila. What is -silent? I don't know
In B “<" is missing.
-s, –silent Be more silent. Print results with a tab as separator,
each row on new line
ok -s, not -silent
anywhere database name is also missing in E!
Ok I’m sorry
-s or –silent with double minus, is an option that I didn’t know …
Anyway as I write above, database name is missing so
in B is missing “<"
in E is missing database name
What is the correct answer?
What is the corret answer?
E is still correct even without the database name.
D&E are the answers.
we can’t use E,
ERROR 1046 (3D000) at line 22: No database selected
we will get above error
Should be C and D
only D, checked.
I take exam at February 26th 2015, on exam writed :
C. mysql -u root -p sakila < sakila2013.sql
so the correct answer is B and C
B and C?
Did you mean D and D?
Sorry, did you mean B and D?
Sorry, I mean the correct answer is B and C
On the exam B writed :
Shell> mysql -u root -p sakila mysqlimport -u root -p sakila sakila2013.sql
But on personal trial, answer C, must change the sakila2013.sql with table name.
Sorry, I mean the correct answer is B and C
On the exam writed:
B. Shell> mysql -u root -p sakila mysqlimport u root p sakila sakila2013.sql
But on personal trial, on answer c the sakila2013 must be change with table name
It is B and D
D is using execute option to perform SQL statements.
Source is equivalent.
C and D
But “<" is missing in C.
C would be correct if the whitespace between mysql and import is wrong.
Mysqlimport does not require the < before the filename.
D is obviously correct.
D isn’t correct.
you will see this if you using D.
C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin>mysql -u root -p ‘use universtas;source uni2015.sql’
mysql Ver 14.14 Distrib 5.6.23, for Win32 (x86)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Usage: mysql [OPTIONS] [database]
-?, –help Display this help and exit.
-I, –help Synonym for -?
–auto-rehash Enable automatic rehashing. One doesn’t need to use
‘rehash’ to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
–disable-auto-rehash.
(Defaults to on; use –skip-auto-rehash to disable.)
-A, –no-auto-rehash
No automatic rehashing. One has to use ‘rehash’ to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect.
–auto-vertical-output
Automatically switch to vertical output mode if the
result is wider than the terminal width.
-B, –batch Don’t use history file. Disable interactive behavior.
(Enables –silent.)
–bind-address=name IP address to bind to.
–character-sets-dir=name
Directory for character set files.
–column-type-info Display column type information.
-c, –comments Preserve comments. Send comments to the server. The
default is –skip-comments (discard comments), enable
with –comments.
default-auth (No default value)
histignore (No default value)
binary-mode FALSE
connect-expired-password FALSE
C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin>
You need the -e for execute for D to be correct.
The correct answer is C and D.
IF Answer E, you will get this error :
C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin>mysql -u root -p -silent mysql -u root -p -s mysqlimport -u root -p univers
itas uni2015.sql
Enter password: ********
mysqlimport: Error: 1146, Table ‘universitas.uni2015’ doesn’t exist, when using
table: uni2015
The way the answers are written, D is the only correct answer.
There are obviously typos.
The closest second answer is B; but it is missing the < between the database and dum file.
B, D
B & D are the right answer, both tested, there is a missing “<" in answer B between the database name and the dump file
B & D perfect…*
I am in fact happy to read this web site posts which carries tons of helpful data, thanks for providing these information.|