当前位置:网站首页>cmd (command line) to operate or connect to the mysql database, and to create databases and tables
cmd (command line) to operate or connect to the mysql database, and to create databases and tables
2022-07-30 21:36:00 【bhegi_seg】
1. Related Instructions
1. Press the windows+R keys on the keyboard to enter cmd, or directly enter cmd in the search box
2. Enter mysql:
Enter mysql -uroot -p at the command line, then enter your mysqlPassword, enter the mysql database after success
3.View databases in mysql
show databases;
4. Use a database
use database name;
The database can only be accessed after we issue the command to use the database
5. View the tables in the database
NoteOnly when we start using this database, we can operate with the database you are using
show tables;
6. View the design structure of the table
describe table name;
or
desc table name;
2. Create a database and its tables
1. First you still need to connect to the database
2.Create database
create database database name;
3.Use database
use database name;
4.Create table
5. Summary
I believe my friends here, and I also know how to insert data to operate the database, I won't go into details here.Thank you for your likes and followings, thank you all!
Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
解决centos8 MySQL密码问题ERROR 1820 (HY000) You must reset your password using ALTER USER
NEOVIM下载安装与配置
mysql死锁
MySQL 5.7详细下载安装配置教程
ClickHouse删除数据之delete问题详解
【Network Security Column Directory】--Penguin Column Navigation
Navigation Bar----Personal Center Dropdown
TransGAN code reproduction - Jiutian Bisheng Platform
Deep Kalman Filter Network for Video Compression Artifact Removal
It is enough for MySQL to have this article (disgusting typing 37k words, just for Bojun!!!)
随机推荐
MYSQL JDBC图书管理系统
It is enough for MySQL to have this article (disgusting typing 37k words, just for Bojun!!!)
navicat无法连接mysql超详细处理方法
深入浅出富文本编辑器
【问题】Mysql Waiting for table metadata lock 解决方案 修改lock_wait_timeout时间
Enhancing Quality for HEVC Compressed Videos
基于ABP实现DDD--领域服务、应用服务和DTO实践
Motion Tuned Spatio-temporal Quality Assessmentof Natural Videos
解决centos8 MySQL密码问题ERROR 1820 (HY000) You must reset your password using ALTER USER
Qt 同时生成动态库和静态库
Navicat new database
MySQL user authorization
Deep Non-Local Kalman Network for VideoCompression Artifact Reduction
CISP-PTE真题演示
字节对齐之C语言犄角旮旯的知识
系统结构考点之并行计算霍纳法则
拿什么来保护数据安全?基层数据安全体系建设待提升
对List集合中每个对象元素按时间顺序排序
Solve the problem of centos8 MySQL password ERROR 1820 (HY000) You must reset your password using the ALTER USER
数据质量提升