Windows:(mysql)
操作: 0.下载安装mysql
www.mysql.org
downloads->进入社区community
community 5.7.21
下载5.6 Microsoft Windows
解压到C: C:\mysql-5.6.39-winx64
C:\mysql-5.6.39-winx64\bin
bin/mysql 客户端
bin/mysqld 服务端
设置环境变量:
我的电脑 属性 高级系统设置 环境变量
系统变量 Path 新建 将 前面加; D:\mysql\mysql-5.6.41-winx64\bin 粘贴 确定...
启动cmd:
>>>:mysqld
>>>:mysql
将mysqld做成系统服务,开机自动启动:
1.先杀死之前开启的mysqld:
           
2.制作系统服务:
C:\Users\Administrator>mysqld --install 制作系统服务
Service successfully installed.
C:\Users\Administrator>mysqld --remove 解除系统服务
Service successfully removed.
---------------------------------------------------------
3.服务
服务-->MySQL-->启动-->ok...
或者:
C:\Users\Administrator>net start MySQL
MySQL 服务正在启动 .
MySQL 服务已经启动成功。 C:\Users\Administrator>net stop MySQL
MySQL 服务正在停止.
MySQL 服务已成功停止。
1.验证安装成功
C:\Users\Administrator>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user(); 注意标点符号也要加
+----------------+
| user() |
+----------------+
| ODBC@localhost |
+----------------+
1 row in set (0.00 sec)
以上是默认帐号登录
mysql> exit
Bye
2. root默认没有密码
root帐号是管理员帐号

3.设置初始密码:上面管理员账户没有设置密码
4.修改密码
5.忘记密码,破解密码,跳过授权表;
 C:\Users\Administor>net stop MySQL
MySQL 服务正在停止.
MySQL 服务已成功停止。 C:\Users\Admininstor>mysqld --skip-grant-tables # 跳过授权表 启动 mysqld

 C:\Users\Administor>mysql -uroot -p    # 跳过了授权 不需要输入密码了
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user();
+--------+
| user() |
+--------+
| root@ |
+--------+
1 row in set (0.00 sec) mysql> update mysql.user set password=password("") where user="root" and host="localhost"; # 修改密码
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec) mysql> exit
Bye C:\Users\Administor>mysql -uroot -p123 # 修改密码成功
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec) mysql> exit
Bye
# 杀死之前 开启的 跳过授权的 mysqld
C:\Users\Administrator>tasklist | findstr mysql
mysqld.exe 6460 Console 1 453,740 K C:\Users\Administrator>taskkill /F /PID 66732
成功: 已终止 PID 为 6460 的进程。 C:\Users\Administrator>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。 C:\Users\Administrator>mysql -uroot -p123 # 用之前设置的密码 登录便可
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec) mysql> exit
Bye

>mysql 套接字客户端

6.登录mysql的两种方式:
C:\Users\Administrator>mysql -uroot -p123
C:\Users\Administrator>mysql -uroot -p123 -h 127.0.0.1 -P 3306 # 默认端口是3306

Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user();
+----------------+
| user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec) mysql> exit
Bye C:\Users\Administrator>mysql -h 127.0.0.1 -P 3306
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2018, 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> select user();
+----------------+
| user() |
+----------------+
| ODBC@localhost |
+----------------+
1 row in set (0.00 sec)

mysql
> exit
Bye

7.统一字符编码:

修改安装目录下的mysql配置文件

新建配置文件my.ini

粘贴内容:

#mysql5.5以上:修改方式有所改动
-----------------------------------
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
----------------------------------
#2. 重启服务
#3. 查看修改结果:
\s
show variables like '%char%'

2 数据库开发--MySQL下载(windows)的更多相关文章

  1. 【数据库开发】在Windows上利用C++开发MySQL的初步

    [数据库开发]在Windows上利用C++开发MySQL的初步 标签(空格分隔): [编程开发] Windows上在上面配置环境的基础上开展一个小demo链接数据库,没想到中间也出现了这么多的问题,简 ...

  2. 【数据库开发】在Windows上和Linux上配置MySQL的过程

    [数据库开发]在Windows上和Linux上配置MySQL的过程 标签(空格分隔): [编程开发] 首先是在Windows上尝试用QT进行MySQL数据库开发,结果总出现driver不能load的错 ...

  3. 1 数据库开发--MySQL介绍

    1.数据库管理软件 C/S 并发.锁 :SQL语句.语法 基本管理和语法学习 一.介绍: mysql数据库管理软件: 套接字:服务端,客户端:客户端可访问服务端得数据 1.支持并发:操作得是共享得数据 ...

  4. 数据库、MySQL下载与安装、基本SQL语句

    数据演变史 # 1.单独的文本文件 没有固定的存放位置 没有固定的数据格式 '''程序彼此无法兼容 没有统一的标准''' # 2.软件开发目录规范 按照文件功能的不同规定了相应的位置 '''文件查找变 ...

  5. mysql数据库之mysql下载与设置

    下载和安装mysql数据库 mysql为我们提供了开源的安装在各个操作系统上的安装包,包括ios,liunx,windows. mysql的安装,启动和基础配置-------linux版本 mysql ...

  6. 数据库之 MySQL --- 下载、安装 及 概述(一)

    个人博客网:https://wushaopei.github.io/    (你想要这里多有) 一 . MySql数据库的安装 1.图解MySQL程序结构 ​ 2.双击运行安装程序:以Win32位为例 ...

  7. 数据库开发 MySQL

    MySQL是Web世界中使用最广泛的数据库服务器.SQLite的特点是轻量级.可嵌入,但不能承受高并发访问,适合桌面和移动应用.而MySQL是为服务器端设计的数据库,能承受高并发访问,同时占用的内存也 ...

  8. 【VS开发】【数据库开发】libevent windows下基于VS2010的编译

    libevent是一个常用的网络库,下面就看看在windows下面编译测试的过程吧. 一 环境 系统:win8.1编译器:VS2013官方下载地址:http://libevent.org/版本:2.0 ...

  9. 【数据库开发】在Windows上以服务方式运行 MSOPenTech/Redis

    在Windows上以服务方式运行 MSOPenTech/Redis ServiceStack.Redis 使用教程里提到Redis最好还是部署到Linux下去,Windows只是用来做开发环境,现在这 ...

随机推荐

  1. 3.4.1 使用过滤式扩展方法(P43-44)

    对IEnumerable<T>执行标准并且同样返回IEnumerable<T>的扩展方法,可以使用yield关键字对源数据中的项应用选择标准,已生成精简的结果集. public ...

  2. redis集群登陆

    如何登陆redis集群 redis-cli -h 10.12.4.45 -p 7000 -c -a alkdsjf134rj01 ip:10.12.4.45 集群中的一个点 -c 以集群方式登陆.cl ...

  3. java--Quartz 定时执行

    第一步:引包(Maven) <!-- 定时任务 --> <dependency> <groupId>org.quartz-scheduler</groupId ...

  4. javascript---关于字符串和数组的方法

    在学习javascript过程中,遇到过很多关于数组和字符串的一些操作.之前也总结了不少方法,可是一遇到自己用的时候,就忘了.不是忘了方法叫什么名,就是忘了方法的参数有什么,返回的是什么? 现在就再次 ...

  5. Python3 条件控制(九)

    Python条件语句是通过一条或多条语句的执行结果(True或者False)来决定执行的代码块. 可以通过下图来简单了解条件语句的执行过程: if 语句 Python中if语句的一般形式如下所示: i ...

  6. spring boot 教程(三)配置详解

    在大部分情况下,我们不需要做太多的配置就能够让spring boot正常运行.在一些特殊的情况下,我们需要做修改一些配置,或者需要有自己的配置属性. Spring Boot 支持多种外部配置方式 这些 ...

  7. 移动端rem布局雪碧图解决方案 以及分享腾讯团队的在线雪碧图工具

    先分享一下地址:http://alloyteam.github.io/gopng/ 使用的方法也很简单,将需要的小图标拖进去,全部拖进去后再调位置(每拖一个进去都会帮你排列好,但是没有间隔,所以全部拖 ...

  8. Python面试题(十六)

    1.取出两个升序数组中的最小的一半的元素组成一个新的升序数组. map(lambda x, y: x if x < y else y, a, b) 答案 2.用至少2种不同的方式删除一个list ...

  9. 虚拟化环境下的CentOS7网络环境存在的问题

    http://dgd2010.blog.51cto.com/1539422/1592821/ 为什么要进行一次测试? 在使用CentOS7的过程中发现网络部分有很多与CentOS6所不同的地方. 1. ...

  10. erp中三大订单CO、PO、MO

    ERP即 企业资源计划 (Enterprise Resource Planning),由美国 Gartner Group 公司于1990年提出. ERP系统是指建立在信息技术基础上,以系统化的管理思想 ...