当前位置:网站首页>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
边栏推荐
- 讲座记录《多种空间大地测量技术的数据处理方法和应用》
- Coinlist queuing tutorial to improve the winning rate
- NFT Insider #63:The Sandbox与时代杂志达成合作,YGG成立西班牙subDAO
- Finereport displays and hides column data according to conditions
- [harmony OS] [ark UI] basic ETS context operations
- Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
- Smart contract learning materials
- How many images can opencv open?
- 2D 照片变身 3D 模型,来看英伟达的 AI 新“魔法”!
- MySQL插入过程报错1062,但是我没有该字段。
猜你喜欢
随机推荐
讲座记录《多种空间大地测量技术的数据处理方法和应用》
Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment
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)
Hello CTP (II) -- Introduction to CTP
1280_ C language to find the average value of two unsigned integer
Coinlist queuing tutorial to improve the winning rate
Color NFT series representing diversity launched on the sandbox market platform
1、项目第二阶段——用户注册和登陆
(ultra detailed onenet TCP protocol access) arduino+esp8266-01s accesses the Internet of things platform, uploads real-time collected data /tcp transparent transmission (and how to obtain and write Lu
"Renaissance" in the digital age? The bottom digital collection makes people happy and sad
PHP code audit 1 - php Ini
2D 照片变身 3D 模型,来看英伟达的 AI 新“魔法”!
“语法糖”——我的编程新知
MySQL order by
Windows 2003 64 bit system PHP running error: 1% is not a valid Win32 Application
讲座记录《捷联惯导解算的历史及发展》
How to use ide to automatically sign and debug Hongmeng application
Openmmlab environment configuration
文本关键词提取:ansj
Development of trading system (VIII) -- Construction of low delay network








