MySQL official tutorial
1.installation
2.setup environment variables
add %/MySQL Server/bin to path.
then restart cmd/powershell
3.invoking mysql programs
command interpreter represents with shell>
enter the program name followed by any options or other arguments.
shell>不是输入的一部分
关于options:
1.参数亦单或者双dash开头来specify程序选项.单后接缩写short form,双后接全写long form.
缩写中间用空格甚至不留空格,全称中间用等号.
2.option大小写敏感 -v for --verbose and -V for --version.
3.一些option后面跟选项名,比如-h localhost or--host=localhost
4.password的特殊性

5. Within option names, dash (-) and underscore (_) may be used interchangeably. For example, --skip-grant-tables and--skip_grant_tables are equivalent. (However, the leading dashes cannot be given as underscores.)
6.Numeric值后可以跟K,M,G表示1024,1024^2,1024^3
e.g. mysqladmin --count=1K --sleep=10 ping
K可以小写k.
7.包含空格的值必须使用引号括起来.
有几种方式来specify选项for MySQL programs:
a)List the options on the command line following the program name.This is common for options that apply to a specific invocation of the program
tions the highest.

4.reset password
官网教程比较详细.
https://dev.mysql.com/doc/mysql-windows-excerpt/8.0/en/resetting-permissions-windows.html
可能因为安全性原因,Google了好几种方法,要么是针对老版本的,要么是针对忘记密码修改密码的.
如果知道密码或者没有密码,想修改密码为其他或者null,其实可以更简单.
假设配置好环境变量,不然的话需要在cmd在Server 8.0的bin目录下启动.
直接shell>mysql -u root[or username if changed] [-p](if set pwd)登入.
然后在控制台中输入:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
如果MyNewPass为空,则没有密码.
ALTER USER root@localhost IDENTIFIED BY 'MyNewPass';
也是等效的.
-------------------
https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html
-----------------------
A> mysqladmin - client for Administering a MySQL server.
mysqladmin is a client for performing administrative operations.
syntax:
shell> mysqladmin [options] command [command-arg] [command [command-arg]] ...
B> mysqlcheck - A Table Maintenance Program
it checks ,repairs, optimizes, or analyzes tables.
mysqlcheck must be used when the mysqld server is running,.
mysqlcheck use the SQL statements CHECK_TABLE| REPAIR_TABLE | ANALYZE_TABLE AND OPTIMIZE_TABLE.
C> mysqldump - A Database Backup Program
the mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database obejct definitions and table data.
It dumps one or more MySQL databases for backup or transfer to another SQL server. THe mysqldump conmmand can also generate output in CSV,outer delimited text, or XML format.
D>mysqlimport - A Data Import Program
The mysqlimport client provides a command-line interface to the LOAD_DATA_INFILE SQL statement.
Syntax:
shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
filename会忽略(strip)拓展名,也就是只要名称相同,所有拓展名包括无拓展名的该名称的文件都会被导入.
E>mysqlpump - A Database Backup Program
the mysqlpump client utility performs logical backups.producing a set of SQL statements that can be executed to reproduce the origin database object definitions and table data.
It dumps one or more MySQL databases for backup or transfer t o another SQL server.
F> mysqlsh - The MySQL Shell
MySQL shell is an advancecd command-line client and code editor for mySQL. In addition to SQL, mysql shell also offers scripting capabilites for JavaScript and Python.
G>mysqlslap - Load Emulation Client
is a diagnostic program designed to emulate client load for a MySQL server and to report the timing of each stage.
It works as if multiple clients are accessing the server.
syntax: shell>mysqlslap [options]
Some options such as --create or --query enable you to specify a string containing an SQL statement or a file containing statements.
MySQL official tutorial的更多相关文章
- mysqlsh : mysql shell tutorial
MySQL Shell 是一个高级的命令行客户端以及代码编辑器for Mysql. 除了SQL,MySQL Shell也提供脚本能力 for JS and Python. When MySQL she ...
- [转载] CMake Official Tutorial——教程还是官方的好
CMake官方教程传送门:https://cmake.org/cmake-tutorial/ 以下的内容跟官方教程基本一致,少数地方根据自己的测试有所改动: A Basic Starting Poin ...
- ROS->The Official Tutorial
系统安装 我的使用环境是Ubuntu 16.04LTS 32bit # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (2016 ...
- [Hibernate] official tutorial - userguide
Persistence contexts org.hibernate.Session API and javax.persistence.EntityManager API represent a c ...
- MySQL vs. MongoDB: Choosing a Data Management Solution
原文地址:http://www.javacodegeeks.com/2015/07/mysql-vs-mongodb.html 1. Introduction It would be fair to ...
- JDBC + MySQL 示例
jdbc mysql connection 教程 翻译自:JDBC MySQL Connection Tutorial Java Database Connectivity (JDBC) 是一个基于J ...
- TensorFlow tutorial
代码示例来自https://github.com/aymericdamien/TensorFlow-Examples tensorflow先定义运算图,在run的时候才会进行真正的运算. run之前需 ...
- How to Install MySQL on CentOS 7
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-communit ...
- Connect C# to MySQL
Connect C# to MySQL using MySQL Connector/Net, Insert, Update, Select, Delete example, Backup and re ...
随机推荐
- Wxpython零基础制作计算器
本文关于Wxpython零基础利用python3.6在pycharm下制作计算器,文章末尾有免费源代码供下载 以后同步更新到博客园和这个网站,www.empirefree.top, 这个网站备案号没有 ...
- bzoj 4585 烟火表演 - 动态规划 - 可并堆
题目传送门 传送门I 传送门II 题目大意 给定一棵带边权有根树,修改一条边的边权的代价是修改前和修改后的值的绝对值之差.不能将一条边的边权改为负数.问使得根节点到所有叶节点的距离相等的最小代价. 当 ...
- hdu 1151 Air Raid - 二分匹配
Consider a town where all the streets are one-way and each street leads from one intersection to ano ...
- ECharts公共组件:title详解、 tooltip详解、toolbox详解、legend详解、dataZoom详解、visualMap全解
1. Title mytextStyle={ color:"#333", //文字颜色 fontStyle:"norm ...
- SpringBoot 利用过滤器Filter修改请求url地址
要求: 代码中配置的url路径为http://127.0.0.1/api/associates/queryAssociatesInfo 现在要求http://127.0.0.1/associates/ ...
- C# DateTime判断时间
两种情况: 1 DateTime? dtTemp = null; if(dtTime != null) { //wawawa } 刚刚学会的,可空值类型,可判断是否赋值 2 DateTime dtTe ...
- yyyy-MM-dd'T'HH:mm:ss.SSS'Z'即UTC时间,与String日期转换
本文为博主原创,未经允许不得转载: 最近在使用一个时间插件的时候,接收到的时间格式是 ’2017-11-27T03:16:03.944Z’ ,当我进行双向数据绑定的时候,由后台传过来的时间绑定到时间 ...
- 良好的GUI设计指南
一.设计指南 摘自:<需求分析与系统设计(第3版)> 7.1.2. 1. 用户控制 用户事件(菜单动作.鼠标点击.屏幕光标移动等)打开GUI窗口或调用程序:程序执行需要反馈到用户. 2. ...
- 用flvplayer.swf在网页中播放视频(网页中flash视频播放的实现)
原:http://blog.csdn.net/ricciozhang/article/details/46868201 由于公司项目的需求,需要在展示一些信息的时候能够播放视频,拿到这个要求,我就从最 ...
- 在服务器端对sshd做白名单
1.添加用户 #useradd aaa #passwd aaa -->输入密码:123456 添加3个用户,bbb和ccc与aaa添加一样 2.添加白名单 #vim /etc/ssd/sshd_ ...