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 ...
随机推荐
- 题说proxy
昨天在和群友讨论时遇到一题是这样的. 题目描述 //Tomy非常敏感,不喜欢别人碰他的东西.一旦有人碰他就会大喊Don't Touch Me. //完成tomy这个对象,禁止对tomy的内容进行修改( ...
- cf水题
题意:输入多组数据,有的数据代表硬币的长宽,有的数据代表钱包的长宽,问你当这组数据代表钱包的长宽时,能不能把它前面出现的所有硬币全部装下. 思路:只要钱包的长宽大于前面出现的所有硬币的长宽就可以装下, ...
- Flask学习【第9篇】:Flask-script组件
Flask Script扩展提供向Flask插入外部脚本的功能,包括运行一个开发用的服务器,一个定制的Python shell,设置数据库的脚本,cronjobs,及其他运行在web应用之外的命令行任 ...
- Spring Boot以War包启动
1.IDEA Spring Initializer自动构建的war包项目,自动生成的Initializer类,用于外部Tomcat容器启动该项目时调用,如果仍然使用主类main函数方式启动则与此类无关 ...
- 学习使用JUnit4进行单元测试
借用http://blog.csdn.net/andycpp/article/details/1327147等文章上面的例子和教程进行学习总结,自己敲了一遍代码,发现里面有些东西,可能版本原因,已经稍 ...
- 题解——洛谷 P2680 NOIP提高组 2015 运输计划
树上差分加上二分答案 详细题解待填坑 #include <cstdio> #include <algorithm> #include <cstring> using ...
- 【AI】微软人工智能学习笔记(三)
微软R服务 01|开源的R R实际上是统计学的编程语言,主要作用是对数据挖掘,统计,分析,可视化,机器学习等. 02|微软R 03| HDInsight R Spark集群存储在azure blob ...
- DAG最小路径点覆盖
Problem 给出一个有向无环图 (\(DAG\)),求出最少使用其中多少条互不相交的路径覆盖所有点. Solution 若有 \(n\) 个点,对于每个点 \(i\) ,我们将它拆成两个点 \(i ...
- Java 基础功底
Java 基础语法特性: 首先了解并做好Java Web 开发环境配置(包含 JDK 的配置)是非常必要的.其中 CLASSPATH 的值开始必须包含 ".",否则用 javac ...
- 每日质量NPM包-classnames
一.classnames 现在到处都追求效率开发,所谓存在即合理,各种各样的开源包/项目火热,也是因为他们大大解决了之前复杂的逻辑.作为榜上前10的热门包:classnames.还真需要了解了解它才能 ...