mysql

mysql

进入到我的数据库 进行更改密码

我的数据库地址

D:\Develop\mysql\bin\mysqld MySQL

  1. 建立数据库

    create database myBlog

  2. 使用数据库

    use myBlog

  3. 创建表名

    必须要有一个主键

​ create table user(id int not null auto_increment primary key ,

​ username varchar(100) not null,

​ password varchar(100) not null);

  1. 删除库名

    DROP DATABASE 库名;

  2. 将表中记录清空

​ DELETE FROM 表名;

  1. 往表中插入数据

​ insert into user values (null, ‘247959360’, ‘12133’);

​ 不填的为空 其他的键值互相对应就可以了

​ 意思就是往states这个表中插入一下关键字

  1. 查看表的结构

select * from user

​ 查询这张表 的数据 这就是查看具体某张表

  1. 查看有几张表

    show tables

  2. 查看有哪些数据库

    show databases;

  3. 删除某条数据

    delete from user  where id = '1';
    
  4. 删除多条数据

    delete from user  where id in (2,4)
    有包含  2和4  首尾都包括了
    
注意 命令结尾 加上分号

个人博客加上 音乐功能 进行边看文章 边听音乐的效果 谨记

https://blog.csdn.net/lx_1024/article/details/78815173 vue实现登录注册功能

login() {
            if (this.username == "" || this.password == "") {
                this.tips = "请输入用户名或者密码"
                this.showTips = true
            } else {
                let data = {
                    'username': this.username,
                    'passsword': this.password
                }
                this.$axios.post('/api/login', data).then((res) => {
                    if (res.data == -1) {
                        this.tips = "该用户不存在"
                        this.showTips = true
                    } else if (res.data == 0) {
                        this.tips = "密码输入错误"
                        this.showtips = true
                    }

                    esle
                    if (res.data == 1) {
                        this.tips = "登录成功"
                        this.showTips = true
                        setCookie('username', this.username, 1000 * 60)
                        setTimeout(function() {
                            this.$router.push('/home')
                        }.bind(this), 1000)
                    } else {
                        console.log('请重新输入')
                    }
                })
            }
        }

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值