In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly tells you how to create and use the database through the MySQ3.3 reference manual. You can look up the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, let's go straight to the topic, and hope that this article on how to create and use the database through the MySQ3.3 reference manual can bring you some practical help.
3.3 Creating and Using a Database3.3 creation using database
3.3.1 Creating and Selecting a Database
3.3.2 Creating a Table
3.3.3 Loading Data into a Table
3.3.4 Retrieving Information from a Table
3.3.1 create and view databases
3.3.2 create a table
3.3.3 load data into a table
3.3.4 retrieve the information in the table
Once you know how to enter SQL statements, you are ready to access a database.
In the last section, you knew how to enter SQL statements. You're ready to access the database.
Suppose that you have several pets in your home (your menagerie) and you would like to keep track of various types of information about them. You can do so by creating tables to hold your data and loading them with the desired information. Then you can answer different sorts of questions about your animals by retrieving data from the tables. This section shows you how to perform the following operations:
Suppose you have several pets in your home and you want to track some of their information. You can save the data by creating a table and load the data as needed. You can retrieve data from the table to answer different questions about animals. This section shows you how to do the following
Create a database
Create a table
Load data into the table
Retrieve data from the table in various ways
Use multiple tables
Create a database
Create a database
Load data into a table
Retrieve data in a table in different ways
Use multiple tables
The menagerie database is simple (deliberately), but it is not difficult to think of real-world situations in which a similar type of database might be used. For example, a database like this could be used by a farmer to keep track of livestock, or by a veterinarian to keep track of patient records. A menagerie distribution containing some of the queries and sample data used in the following sections can be obtained from the MySQL Web site. It is available in both compressed tar file and Zip formats at http://dev.mysql.com/doc/.
The menagerie database is simple (intentional), but it's not hard to imagine a database with a similar situation in real life. For example, a similar database could be used by farmers to record records used to track livestock or veterinarians to track pet diseases. You can get the menagerie database from the MySQL website, which contains some statements and simple data. Two packaged versions of tar (linux) and Zip (windows) are available on the http://dev.mysql.com/doc/ website.
Use the SHOW statement to find out what databases currently exist on the server:
Use the show statement to check the database that currently exists on the device:
Mysql > SHOW DATABASES;+-+ | Database | +-+ | mysql | | test | | tmp | +-+
The mysql database describes user access privileges. The test database often is available as a workspace for users to try things out.
The mysql database describes the user's access rights. Test databases usually provide users with test space.
The list of databases displayed by the statement may be different on your machine; SHOW DATABASES does not show databases that you have no privileges for if you do not have the SHOW DATABASES privilege. See Section 13.7.5.15, "SHOW DATABASES Syntax".
The list of databases displayed by the statement may be different on your machine; SHOW DATABASES does not display databases for which you do not have SHOW DATABASES permissions. See Section 13.7.5.15, "SHOW DATABASES Syntax".
If the test database exists, try to access it:
If the test database exists, try to access it:
Mysql > USE testDatabase changed
USE, like QUIT, does not require a semicolon. (You can terminate such statements with a semicolon if you like; it does no harm.) The USE statement is special in another way, too: it must be given on a single line.
USE, like QUIT, does not need to be sorted (you can use semicolon termination if you like; this is OK). On the other hand, USE is special: use statements can only be written on one line.
You can use the test database (if you have access to it) for the examples that follow, but anything you create in that database can be removed by anyone else with access to it. For this reason, you should probably ask your MySQL administrator for permission to use a database of your own. Suppose that you want to call yours menagerie. The administrator needs to execute a statement like this:
You can use the test database (if you have access to the database) to get the following example, but anyone who can access the database can delete anything created in the database. Therefore, you can ask your MySQL administrator to only allow you to access the database. Suppose you want to access your menagerie database. The administrator needs to execute the following statement:
Mysql > GRANT ALL ON menagerie.* TO 'your_mysql_name'@'your_client_host'
Where your_mysql_name is the MySQL user name assigned to you and your_client_host is the host from which you connect to the server.
Your_mysql_name is the MySQL user name assigned to you and your_client_host is your host.
How to create and use the database through the MySQ3.3 reference manual will first tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.