In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to operate MySQL 5.7database commands, the contents of the articles are carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand how to operate MySQL 5.7database commands.
Description
After the installation of the database, the following is used, there are many database commands, here only operate some simple commands, after all, too complex to remember, I am also very helpless ah. Database add, delete, change, check is necessary, but also some basic commands, and then do some examples.
Experimental requirements: centos7 installed MySQL
First, do the authorized remote login of the database.
1. Mysql-u root-p # use root users to log in to the database
Grant all privileges on. To 'root'@'%' identified by' qwe123' with grant option; # authorized as root, password as qwe123,% to allow all networks to log in, and two asterisks for all databases and all tables
.
.
2. To know the ip address of the virtual machine where the database is installed, use this ip to log in remotely
.
.
3. The example here is a host. Open the host cmd command prompt interface to ensure that it can be interconnected with the virtual machine. You can ping it, and then enter the command.
Mysql-h 192.168.200.128Muru root-p
Remote authorization login succeeded
.
.
Let's start the command operation of the database
.
1. First, add and view the database.
.
.
2. Enter the database to create tables and view table structure
.
.
3. Insert data in the table and view the data in the table
.
.
4. The data will inevitably be changed.
.
.
5. Set the primary key
.
.
6. Sort the data in the table
.
.
7. View the data of the specified row and calculate the sum and average of the scores in it
.
.
8. Delete primary keys, delete columns, and view the results
.
.
9. Delete the table and view the results
.
.
10. Finally, delete the database and view the results
After reading the above about how to operate MySQL 5.7database commands, many readers must have some understanding, if you need to get more industry knowledge and information, you can continue to follow our industry information column.
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.