当前位置:网站首页>CMD window under Windows connects to MySQL and operates the table
CMD window under Windows connects to MySQL and operates the table
2022-07-29 05:47:00 【Just learning records】
1、
mysql After installation , Command window connection needs to be configured path environment variable , The value is mysql Installed directory /bin. Pictured ,Windows + r Pop up the command window cmd, enter 
2、
stay DOS Command window input mysql -hlocalhost -uroot -p enter Get into mysql database , among -h Represents the server name ,localhost Means local ;-u User name for database ,root yes mysql Default user name ;-p Is password , If the password is set , But directly in -p After the link input , Such as :-p123456, The user didn't set the password , Show Enter password when , Just go back .
Be careful , If your mysql Not installed in C Under the plate , You need to use DOS Order to enter mysql Under the installation directory of bin Directory . Such as : Installed in e disc , Input e: Get into e disc , In the input cd e:\Tools\MySQL5.5.25\bin Enter into mysql Of bin You can enter it in the directory mysql -hlocalhost -uroot -p
3、
View all databases , Input “show databases:”, Be sure to add a semicolon in English , because mysql Middle is marked with a semicolon . If it is not added, an error may be reported, or nothing may be displayed on the interface , here , We need to end this statement , Press down Ctrl+c Just re-enter ,
4、
Query all the tables in the database . You need to specify the database first :”use Library name ;” And then through “show tables” Check it out. 
5、、
Query all fields of the specified table :show columns from Database name . Table name
Create database :create database Database name ;
6、 Create table :CREATE TABLE The name of the table
(
Column name 1 data type ,
Column name 2 data type ,
Column name 3 data type ,
….
)
Such as : Create a student surface :
create table student
(
s_id int,
s_name varchar(255),
s_age varchar(255)
)
7、 I'm lazy , But the back is gone
边栏推荐
- 365 day challenge leetcode1000 question - day 036 binary tree pruning + subarray and sorted interval sum + delete the shortest subarray to order the remaining arrays
- 实现table某个单元格背景色设置
- Related knowledge of elastic box
- DAY6:利用 PHP 编写文件上传页面
- QT layout management -- Part stretch principle and sizepolicy
- Win10 compiles ffmpeg (including ffplay)
- Set the background color of a cell in the table
- [JS question solution] questions 1-10 in JS of niuke.com
- 熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
- [untitled]
猜你喜欢

Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect

新手入门:手把手从PHP环境到ThinkPHP6框架下载

DAY14:Upload-labs 通关教程

Laravel服务容器(继承与事件)

解决表单校验提示信息不消失问题以及赋值不生效问题

超简单集成HMS ML Kit 人脸检测实现可爱贴纸

Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)

Crypto巨头们ALL IN元宇宙,PlatoFarm或能突围

实现table某个单元格背景色设置

改哭了,终于解决了Cannot read properties of undefined (reading ‘parseComponent‘)
随机推荐
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
Seay source code audit system
What is wapiti and how to use it
与开源项目同步开发& CodeReview & Pull Request & fork怎么拉取原始仓库
如何 Pr 一个开源composer项目
Fantom (FTM) surged 45% before the FOMC meeting
Cmu15-213 shell lab experiment record
[typescript] in depth study of typescript functions
Display effect of uniapp page title
Okaleido tiger logged into binance NFT on July 27, and has achieved good results in the first round
获取水仙花数
运动健康深入人心,MOVE PROTOCOL引领品质生活
Countdown of the uniapp component (such as the countdown to reading the agreement and the countdown to completing learning)
华为2020校招笔试编程题 看这篇就够了(下)
dcat 批量操作弹窗及参数传递
熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
Introduction to C language array to proficiency (array elaboration)
华为2020校招笔试编程题 看这篇就够了(上)
MOVE PROTOCOL全球健康宣言,将健康运动进行到底
The LAAS protocol of defi 2.0 is the key to revitalizing the development of defi track