当前位置:网站首页>CMD operation MySQL in Windows
CMD operation MySQL in Windows
2022-06-25 04:24:00 【Robin Luo Bing】
1、mysql Start and stop of service
net stop mysql
net start mysql
2、 Sign in
open CMD
Switch working directory to MySQL Of bin Next
mysql -u root -p
Enter the password to log in MySQL
To break off :exit ( enter )
3、 operation
Display database :show databases;
Show data sheet :show tables;
Display table structure :describe Table name ;
Create a library :create database Library name ;
Delete Library :drop database Library name ;
Use the library :use Library name ;
Create table :create table Table name ( Field setting list );
Delete table :drop table Table name ;
Modify table :alter table t1 rename t2
Query table :select * from Table name ;
Clear the table :delete from Table name ;
Backup tables : mysqlbinmysqldump -h(ip) -uroot -p(password) databasename tablename > tablename.sql
Restore table : mysqlbinmysql -h(ip) -uroot -p(password) databasename tablename < tablename.sql( Delete the original table before operation )
Add column :ALTER TABLE t2 ADD c INT UNSIGNED NOT NULL AUTO_INCREMENT,ADD INDEX (c);
Modify the column :ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20);
Delete column :ALTER TABLE t2 DROP COLUMN c;
Set encoding :set names utf8
Backup database :mysql\bin\mysqldump -h(ip) -uroot -p(password) databasename > database.sql
4、 Backup 、 Import
Derived data :mysqldump –opt test > mysql.test
Import data :source D:\ceshi.sql
边栏推荐
- [kubernetes series] installation and use of Helm
- 1280_ C language to find the average value of two unsigned integer
- SQL, CTE, flg case problems
- 代錶多樣性的彩色 NFT 系列上線 The Sandbox 市場平臺
- [openwrt] we recommend a domestically developed version of openwrt, an introduction to istoreos. It is very easy to use. It is mainly optimized. It solves the problem of Sinicization.
- Simple integration of client go gin 11 delete
- Laravel document sorting 7. View
- Mysql的order by
- 【Proteus仿真】Arduino UNO按键控制数码管闪烁增/减显示
- Lecture record: history and development of strapdown inertial navigation solution
猜你喜欢

Color NFT series representing diversity launched on the sandbox market platform

PHP code audit 1 - php Ini

如何绘制产业招商地图

Summary of various problems encountered by cocos2d-x

Siddhartha: the book of life can be regurgitated frequently

Development of trading system (V) -- Introduction to Sinovel counter

"How to carry out industrial positioning" in local / Park industrial planning

Interview with Mo Tianlun | ivorysql wangzhibin - ivorysql, an Oracle compatible open source database based on PostgreSQL

文本关键词提取:ansj

Coinlist queuing tutorial to improve the winning rate
随机推荐
Changsha's "talent seeking": "making efforts" and "making practical moves" go hand in hand, "rapid development" and "slow life" go hand in hand
How to draw an industry investment map
[kubernetes series] installation and use of Helm
驻波比计算方法
1280_ C language to find the average value of two unsigned integer
The 5th series of NFT works of missing parts was launched on the sandbox market platform
Nodejs 通过Heidisql连接mysql出现ER_BAD_DB_ERROR: Unknown database 'my_db_books'
冷热酸甜、想成就成?冷酸灵母公司登康口腔欲在深交所主板上市
Zoran community
LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路
Mathematical analysis_ Notes_ Chapter 3: limits
Numpy NP tips: use OpenCV to interpolate and zoom the array to a fixed shape cv2 resize(res, dsize=(64, 64), interpolation=cv2. INTER_ CUBIC)
Laravel document sorting 10. Request life cycle
client-go gin的简单整合十一-Delete
Exercise: how difficult is it to simulate the blessing lottery two-color ball - China 500W grand prize? Just run the code.
Hello CTP (III) - CTP quotation API
cesium 图形标注圆形、正方形、多边形、椭圆等
PHP code audit 2 - these functions must be known and understood
Hello CTP (V) -- CTP position calculation
kenlm