当前位置:网站首页>Summary of common mysql8 commands in centos7 environment
Summary of common mysql8 commands in centos7 environment
2022-06-10 21:51:00 【1024 Q】
Preface
One 、 Common sentences
1、 Sign in & sign out
2、 Common operations
attach : Common sentences
summary
PrefaceCentOS7 install MySQL8 The detailed steps
MySQL View table footprint
MySQL: Range query optimization
CentOS7 + MySQL8
One 、 Common sentences 1、 Sign in & sign out# Connect to the database of this server mysql -u root -p# sign out exit/*-----------------------------------------*/# Other servers connect to the database # Introduction to database connection . Instruction is mysql, The common options are :# -h: host host# -P: port prot# -u: user name user# -p: User password 123456mysql -h172.22.1.143 -u root -P 6399 -p1234562、 Common operations # See what databases are show databases; # Create a database create database video_db;# Choose to use video_db database use video_db;# View tables in the database show tables;# View the currently selected database select database();# see video_info Table all field information desc video_info; attach : Common sentences // If no error is reported during startup, the startup is successful , Even if “Redirecting to /bin/systemctl start mysql.service”// In specific cases, you can use the status query instruction to query its status .service mysqld start # Use service start-up mysql service service mysqld status # see MYSQL Running state service mysqld stop # Use service stop it mysql service service mysqld restart # Use service restart mysql service // Inquire about mysql edition (1) Terminal execution mysql -V (2)mysql Inside view select version();// Connect to database mysql -u root -p # Log in to my cloud service as an administrator pscode yes (tantan_esc Same as ):zS+qq.quit # sign out mysql/*-----------------------------------------*/ Introduction to database connection . Instruction is mysql, The common options are :-h: host host-P: port prot-u: user name user-p: User password passcode-A: Do not read database information in advance ( When there are many tables in the database, the pre Reading database information will be so slow that it will get stuck ) Table name : You can add the library name at the end . This is equivalent to entering the database directly , It's equivalent to executing once use Library name ; give an example : Examples are as follows , Pay attention to the last one -p No spaces ....!!!!......mysql -h 100.65.202.233 -P 4236 -u uds_root [email protected]/*-----------------------------------------*/create database shop;// Create a database show databases; // See what databases are use shop; // Choose to use shop database select database(); // View the currently selected database show tables; // View tables in the database select * from biao1; // see biao1 The data of drop table chengji; // Delete table chengji; show columns from biao1; // see biao1 create table chengji(yingyu int,yuwen int,shuxue int);// newly build chengji surface , And insert response fields alter table chengji add meishu varchar(50) not null; // To watch chengji Add fields to meishu; rename table chengji to chengji2; // Change the name of the grade to grade 2 show create table biao1; # View the table creation statement select count(*) from mytable; # see mytable Common operation examples of data volume in the table :insert into t_XXX_search_config (FCorpUin,FDisplay,FTopPos,FQuality,FActivity) values(2852158899,4,10000,0,0) limit 1;update t_XXX_search_config set FDisplay = 888 where FCorpUin = 1820140703 limit 1;delete from XXXXX_BIZ.t_xxxxx_all where FKFUin = 800853466 limit 1;delete from table_name; # Clear table data summary This is about CentOS7 In the environment MySQL8 This is the end of the article on common commands , More about CentOS7 MySQL8 Please search the previous articles of SDN or continue to browse the related articles below. I hope you can support SDN more in the future !
边栏推荐
- 01js基础 null与undefined区别 类型转换 == 代码块 逻辑运算符
- 2022-06-09 RK817 PMU 电池温度检测
- LeetCode 进阶之路 - 169.多数元素
- Qingniao Changping campus of Peking University: can I learn UI with a high school degree?
- Codeforces Round #798 (Div. 2)
- Factory and strategy mode implementation scheme of coupons
- Video monitoring system storage control, bandwidth calculation method
- C language ---5 initial string, escape character and comment
- Standard dual airbags, starting from 48900 for butcher Chang'an Lumin
- 异步、线程池(CompletableFuture)
猜你喜欢

C language -- 1 c language cognition

^30h5 web worker multithreading

Redis cache avalanche

As a programmer, is it really that important for the underlying principles?

1、 Vulkan develops theoretical fundamentals

微积分复习1
![[nk] 牛客月赛51 F-平均题](/img/b3/c36a0032e606f38fdc2f7c4562713c.png)
[nk] 牛客月赛51 F-平均题

「运维有小邓」自助帐户解锁工具

Understanding of related concepts of target detection

实用 | 如何利用 Burp Suite 进行密码爆破!
随机推荐
自制Table錶格
H265 Nalu type judgment and SPS data analysis
01js基础 null与undefined区别 类型转换 == 代码块 逻辑运算符
MySQL insère les résultats de la requête dans une autre table
[qingniaochangping campus of Peking University] the coordinated development of vocational education and general education, will this year's high school entrance examination be easy?
LeetCode 进阶之路 - 搜索插入位置
Read the source code of micropyton - add the C extension class module (2)
CCF class a conference or journal - regression related papers
SQL Server2019安装的详细步骤实战记录(亲测可用)
Leetcode advanced path - delete duplicates in the sorting array
学IT毕业后该去哪个城市?哪个岗位薪资高?哪些公司待遇好?
记录一下今天的MySQL故障
蛮力法/1~n的全排列 v3 递归
Video monitoring system storage control, bandwidth calculation method
在手机上买基金安全吗?会不会被吞本金?
Redis缓存雪崩
C language -- 4 first-time constant
一次SQL查询优化原理分析(900W+数据从17s到300ms)
Quick start to VISSIM simulation
Acl2022 | bert2bert: an efficient pre training method of parameter reuse, which significantly reduces the training cost of oversized models