In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to operate the mysql database, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
Under window, start and stop the mysql service
Start my
Net start mysql
Www.2cto.com
Stop the mysql database
Net stop mysql
Restart the mysql database
Net restart mysql
Command line form, the use of mysql basic commands
1. Cancellation of the order
\ c
2. Exit the mysql window
Exit; or quit; or ctrl+c
3. Check the database version number
Select version ()
4. Show the currently existing database
Show databases
Www.2cto.com
5. Select test database
Use test
6. View the selected database
Select database ()
7. Set the database Chinese code
Set names utf8
8. Create a test database
Create database test
9. Create a mtest table
Create table mtest (
Id tinyint (2) unsigned not null auto_increment
Name varchar (20)
Sex char (1)
Email varchar (50)
Birth datetime
Primary key (id)
);
10. Insert a piece of data into the mtest table
Insert into mtest (`name`, `sex`, `email`, `room`) values ('zhangsan','1','zhangsan@163.com',now ())
Www.2cto.com
11. Query the information that name is Zhang San in the mtest table
Select * from mtest where name='zhangsan'
12. Output according to the descending order of id number
Select * from mtest order by id desc
13. Display items 11 to 20 data information
Select * from mtest id limit 10
The above is all the contents of the article "how to operate mysql Database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.