SQL partial list of the files, terms, and utilities used
The following is a partial list of the files, terms, and utilities used:
•insert
•update
•select
•delete
•from
•where
•group by
•order by
•join
LX0-104 Exam Objectives (G)
Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts
Thursday, December 8, 2016
Manipulating SQL Data
Manipulating SQL Data
After installing your MySQL packages, you next need to set up your
MySQL server’s granttables. All MySQL access controls are managed from within the MySQL
service itself. It’s important to understand that MySQL has its own unique set of user accounts
defined in its grant tables; it doesn’t use the accounts defined on your Linux system. Five tables
are implemented within the MySQL database to do this:
user
Specifies whether a user is allowed to connect to the MySQL server
db
Defines which databases a user is allowed to access
host
Specifies which hosts are allowed to access a particular database
tables_priv
Defines access privileges for a given table
columns_priv
Specifies access privileges for specific columns of data for a given table
These tables must be initialized before you can use MySQL. This is
done by changing to the
/usr/bin directory
and running the
mysql_install_db
command at the shell prompt.
With the grant tables created, you next need to start the database
service.
If your distribution uses init, you can use the mysql init script located in your init
script directory. Then you can use the insserv or chkconfig
command to ensure the database service starts
every time the system
boots. If your distribution uses systemd, you can use the systemctl
command to enable and start the mysql service.
To verify that the server is running, you can enter the
mysqladmin version
command at the shell prompt.
you can view the databases currently on the server by entering
mysqlshow
at the command prompt.
You can also view the tables within any of the databases shown in the
output using the
mysqlshow table_name
command.
Now that MySQL is running properly, you need to assign passwords to
your MySQL user accounts.
After you run msql_install_db, your root database user account has been created but has no password assigned. To remedy this, enter
mysqladmin –u root password ‘your_new_password'
at the shell prompt. Then restrict root access to the system where MySQL is running
by entering
mysqladmin –u root –h system_hostname password mysql_root_user_password
at the shell prompt.
LX0-104 Exam Objectives (G)
After installing your MySQL packages, you next need to set up your
MySQL server’s granttables. All MySQL access controls are managed from within the MySQL
service itself. It’s important to understand that MySQL has its own unique set of user accounts
defined in its grant tables; it doesn’t use the accounts defined on your Linux system. Five tables
are implemented within the MySQL database to do this:
user
Specifies whether a user is allowed to connect to the MySQL server
db
Defines which databases a user is allowed to access
host
Specifies which hosts are allowed to access a particular database
tables_priv
Defines access privileges for a given table
columns_priv
Specifies access privileges for specific columns of data for a given table
These tables must be initialized before you can use MySQL. This is
done by changing to the
/usr/bin directory
and running the
mysql_install_db
command at the shell prompt.
With the grant tables created, you next need to start the database
service.
If your distribution uses init, you can use the mysql init script located in your init
script directory. Then you can use the insserv or chkconfig
command to ensure the database service starts
every time the system
boots. If your distribution uses systemd, you can use the systemctl
command to enable and start the mysql service.
To verify that the server is running, you can enter the
mysqladmin version
command at the shell prompt.
you can view the databases currently on the server by entering
mysqlshow
at the command prompt.
You can also view the tables within any of the databases shown in the
output using the
mysqlshow table_name
command.
Now that MySQL is running properly, you need to assign passwords to
your MySQL user accounts.
After you run msql_install_db, your root database user account has been created but has no password assigned. To remedy this, enter
mysqladmin –u root password ‘your_new_password'
at the shell prompt. Then restrict root access to the system where MySQL is running
by entering
mysqladmin –u root –h system_hostname password mysql_root_user_password
at the shell prompt.
LX0-104 Exam Objectives (G)
Commands to manage data in an SQL database
Managing SQL Data
You can use the following commands to manage data in an SQL database:
• SELECT
Retrieves information from a table
• UPDATE
Modifies information in a table
• DELETE
Removes information from a table
• INSERT INTO
Adds new data to a table
• CREATE TABLE
Creates a new table
• ALTER TABLE
Modifies an existing table
• DROP TABLE
Deletes and existing table
A key feature of relational databases is the fact that you can create
relationships between tables, which allows you to create interrelated data sets.
LX0-104 Exam Objectives (G)
You can use the following commands to manage data in an SQL database:
• SELECT
Retrieves information from a table
• UPDATE
Modifies information in a table
• DELETE
Removes information from a table
• INSERT INTO
Adds new data to a table
• CREATE TABLE
Creates a new table
• ALTER TABLE
Modifies an existing table
• DROP TABLE
Deletes and existing table
A key feature of relational databases is the fact that you can create
relationships between tables, which allows you to create interrelated data sets.
LX0-104 Exam Objectives (G)
Subscribe to:
Posts (Atom)