mysql 8.0.11 64安装_mysql-8.0.11-winx64.zip安装教程详解

D:\Software\mysql-8.0.11-winx64\bin>mysqld --initialize --console

2018-06-14T02:15:42.040910Z 0 [System] [MY-013169] [Server] D:\Software\mysql-8.0.11-winx64\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 9196

2018-06-14T02:15:55.997459Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ;sHD)Yjrd9kr

2018-06-14T02:16:03.993614Z 0 [System] [MY-013170] [Server] D:\Software\mysql-8.0.11-winx64\bin\mysqld.exe (mysqld 8.0.11) initializing of server has completed

D:\Software\mysql-8.0.11-winx64\bin>mysqld --install

Service successfully installed.

D:\Software\mysql-8.0.11-winx64\bin>net start mysql

MySQL 服务正在启动 ..

MySQL 服务已经启动成功。

D:\Software\mysql-8.0.11-winx64\bin>mysql -uroot -p;sHD)Yjrd9kr

mysql: [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: 8.0.11

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> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';

Query OK, 0 rows affected (0.05 sec)

mysql> show database;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| sys |

+--------------------+

4 rows in set (0.01 sec)

mysql> select user,host,authentication_string from mysql.user;

+------------------+-----------+-------------------------------------------+

| user | host | authentication_string |

+------------------+-----------+-------------------------------------------+

| mysql.infoschema | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| mysql.session | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| mysql.sys | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |

| root | localhost | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |

+------------------+-----------+-------------------------------------------+

4 rows in set (0.00 sec)

mysql>

配置文件my.ini

[mysqld]

设置3306端口

port=3306

设置mysql的安装目录

basedir=C:\Program Files\MySQL

设置mysql数据库的数据的存放目录

datadir=E:\database\MySQL\Data

允许最大连接数

max_connections=200

允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统

max_connect_errors=10

服务端使用的字符集默认为UTF8

character-set-server=utf8

创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

默认使用“mysql_native_password”插件认证

default_authentication_plugin=mysql_native_password

[mysql]

设置mysql客户端默认字符集

default-character-set=utf8

[client]

设置mysql客户端连接服务端时默认使用的端口

port=3306

default-character-set=utf8

初始化数据库

mysqld –initialize –console

注意!执行输出结果里面有一段: [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: rI5rvf5x5G,E 其中root@localhost:后面的“rI5rvf5x5G,E”就是初始密码(不含首位空格)。在没有更改密码前,需要记住这个密码,后续登录需要用到。

安装服务

mysqld –install

net start mysql

mysql -uroot -p;sHD)Yjrd9kr

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘root’;

show database;

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值