Mysql 刷库操作实例

Mysql 刷库操作实例一 文件展示 注意 我们的刷库语句放在 c db all 下面 后期 cmd 操作要进入该目录下二 文件内容 1 InitAll sql 文件内容 2 initDatabase sql 文件内容 dropdatabase

大家好,欢迎来到IT知识分享网。

一、文件展示:

注意:我们的刷库语句c:\db\all下面,后期cmd操作要进入该目录下

 Mysql 刷库操作实例

二、文件内容:

1. InitAll.sql 文件内容:

 Mysql 刷库操作实例

2.initDatabase.sql 文件内容:

drop database if exists test;

create database test default character set utf8;

3.initDBUser.sql 文件内容:   在第四步骤中用用户名dfbb,密码dfbb登录客户端

grant all privileges on *.* to ‘dfbb’@’localhost’ identified by ‘dfbb’;

grant all privileges on *.* to ‘dfbb’@’%’ identified by ‘dfbb’;

4.建表语句,建约束,建索引,插数据啥的sql语句自己就随意写写,这里就不做交代了

三、cmd客户端操作

Microsoft Windows [版本 10.0.16299.192]

(c) 2017 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>cd c:\db\all

c:\db\all>mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 27

Server version: 5.7.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> source initAll.sql

Query OK, 40 rows affected (3.96 sec)

Query OK, 1 row affected (0.03 sec)

Query OK, 0 rows affected, 1 warning (0.16 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Database changed

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

四、客户端访问

Mysql 刷库操作实例

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/135233.html

(0)
上一篇 2025-07-06 13:10
下一篇 2025-07-06 13:15

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信