当前位置:网站首页>数据库小练习
数据库小练习
2022-04-21 21:32:00 【spring℡】
数据库练习1
1、创建数据库school,字符集为utf8
2、在school数据库中创建Student和Score表
3、授权用户tom,密码mysql,能够从任何地方登录并管理数据库school
1、创建数据库school,字符集为utf8
mysql> create database school default character set utf8mb4;
Query OK, 1 row affected (0.00 sec)
mysql> use school;
Database changed
2、在school数据库中创建Student和Score表
mysql> create table Student ( Id int(10) primary key auto_increment comment '学号', Name varchar(20) not null comment '姓名', Sex varchar(4) comment '性别', Birth YEAR comment '出生年份', Department varchar(20) not null comment '院系' , Address varchar(50) comment '家庭住址');
Query OK, 0 rows affected (0.03 sec)
mysql> create table Score( -> Id INT(10) primary key auto_increment comment '编号', -> Stu_id INT(10) not null comment '编号', -> C_name VARCHAR(20) comment '课程名', -> Grade INT(10) comment '分数' ) -> ;
3、授权用户tom,密码mysql,能够从任何地方登录并管理数据库school
mysql> create user tom@'192.168.157.%' identified by 'Tom@1234';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on school.* to tom@'192.168.157.%';
Query OK, 0 rows affected (0.01 sec)使用客户端登录
版权声明
本文为[spring℡]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_52951697/article/details/124303128
边栏推荐
猜你喜欢

JMeter (XVI) - from introduction to mastery - JMeter preprocessor (detailed tutorial)

微软 | 通过对比学习预训练的多语言分子表征学习

Gan remake 2, which seems to be fun -- keras built srgan platform to improve the super-resolution of pictures

(亲测有效)Oracle在linux下命令行无法使用退格键退格,无法使用上下键切换历史命令的解决办法,会出现乱码

AI + great health is the right way to open the super robot?

睿智的目标检测50——Tensorflow2 利用mobilenet系列(v1,v2,v3)搭建yolov4目标检测平台

Workflow report setting customization development

Keil Package常用芯片高速下载地址,含历史版本,快关注我速速收藏

产品增长框架:从 Web2 到 Web3
![[ZigBee wireless communication module step by step] zigbee3 0 module to establish remote network control method](/img/d5/5102aae908f444e187ebc812e236a9.png)
[ZigBee wireless communication module step by step] zigbee3 0 module to establish remote network control method
随机推荐
The programming competition team of Taiyuan University of technology has a bumper harvest in 2022
Red sun shooting range -- intranet penetration practice
Shell编程学习(四)read读取、函数、文件归档、定时任务
Cross compile C program for rk3568 development board
Flutter plug-in third-party library, some interview suggestions for Android programmers
Bailian4004 数字组合【递归+DP】
还清90万安居贷才能拿到离职证明?腾讯回应:与实际情况不符
Others - use of siege pressure test tool
Tgip-cn 038 registration | in depth analysis of Apache pulsar source code reading correct posture (I)
好像还挺好玩的GAN重制版2——Keras搭建SRGAN平台进行图片超分辨率提升
清洁机器人--红外下视传感器,检测是否存在地面距离突变的情形
The shell finds or deletes files based on their suffixes
two hundred and thirty-two thousand one hundred and thirty-one
返璞归真,多方安全计算要回归到“安全”的本源考虑
Reflection 111
Eeasybi report system data source selection code development manual
动态连接数据源与事务回滚
(valid for personal test) Oracle can't use backspace key to backspace the command line under Linux, and can't use up and down keys to switch the historical command. There will be garbled code
Reflex WMS system has several similarities with SAP system
Mongo geoNear query 中文模糊搜索在PHP中的使用


