加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows 2012安装mysql 5.7.22 企业版

发布时间:2020-12-13 20:59:04 所属栏目:Windows 来源:网络整理
导读:一、环境描述操作系统:windows 2012数据库:mysql 5.7.12 企业版二、操作步骤1、规划MySQL安装文件存放在D:mysql,数据目录为E:mysqldata2、配置文件位置为d:mysqlmy.ini 内容如下:[mysqld] port = 3306 basedir= D:mysqldatadir= E:mysqldatamax_con
一、环境描述
操作系统:windows 2012
数据库:mysql 5.7.12 企业版

二、操作步骤
1、规划
MySQL安装文件存放在D:mysql,数据目录为E:mysqldata
2、配置文件位置为d:mysqlmy.ini  内容如下:
[mysqld]  
port = 3306  
basedir= D:mysql
datadir= E:mysqldata
max_connections=500  
character-set-server=utf8  
default-storage-engine=INNODB  
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  
[mysql]  
default-character-set=utf8

3、安装服务
C:Usersadmin>d:
D:&;cd mysqlbin
D:mysqlbin>.mysqld -install 
4、初始化mysql
.mysqld --initialize-insecure --user=mysql
5、启动服务
D:mysqlbin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
6、登陆数据库
D:mysqlbin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.7.22 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>
7、修改密码
use mysql;
update mysql.user set authentication_string=password('qwe12345') where user='root' and Host ='localhost';
flush privileges;
8、关闭服务
D:mysqlbin>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读