• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/20

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

20 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)
what is the command line prompt to connect to a mysql server on localhost as the user root?
mysql -h 'localhost' -u 'root' -p
how do you know when you are connected to the mysql server?
the prompt changes to:

mysql>
what is the syntax that will tell you what version of mysql you are running?
mysql> select version();
what is the syntax to determine what databases are running on the mysql server?
mysql> show databases;
what command do you issue to set the default database to default_db?
mysql> use default_db;
what are the two syntaxes for getting the version of mysql
mysql> select version();
cmd> mysql --version
What is mysqldump used for?
The mysqldump client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server).
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
To get a consistent backup, what 2 things should you do first?
lock tables
flush tables
http://dev.mysql.com/doc/refman/5.0/en/backup.html
Normally, how does mysqldump treat the first name argument on the command line?
Normally, mysqldump treats the first name argument on the command line as a database name and following names as table names.
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html find on page -B
What is the -B option used for?
Dump several databases.

Normally, mysqldump treats the first name argument on the command line as a database name and following names as table names.

With this option -B, it treats all name arguments as database names.

CREATE DATABASE and USE statements are included in the output before each new database.
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html find on page -B
What command line do you issue to determine which database is in use?
mysql> select database();
http://dev.mysql.com/doc/refman/5.0/en/creating-database.html
What command line do you issue to see the tables in a database?
mysql> SHOW TABLES;
http://dev.mysql.com/doc/refman/5.0/en/creating-tables.html
What command line do you issue to see a table's schema?
mysql> DESCRIBE <tbl_name>;
http://dev.mysql.com/doc/refman/5.0/en/creating-tables.html
In the mySQL reference, where do you look for more information on mysql privileges tables?
5.4. The MySQL Access Privilege System
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
When you run a client program that connects to the server, MySQL access control involves what?
2 stages:

Stage 1: The server accepts or rejects the connection based on your identity and whether you can verify your identity by supplying the correct password.
Stage 2: Assuming that you can connect, the server checks each statement you issue to determine whether you have sufficient privileges to perform it.
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
what command line do you issue to see a list of users?
mysql> select user, host from user;
what command line do you issue to see what grants the user has?
SHOW GRANTS FOR 'joe'@'office.example.com';
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
what table contains the users?
user
When the user's host is %, what does that mean?
The user was created without a host value.
http://dev.mysql.com/doc/refman/5.0/en/create-user.html
How does mysql server determine a user's identity?
identity is determined by the host from which you connect and the user name you specify
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html