mysql-5.6.24-winx64 在win10安装

mysql-5.6.24-winx64 在win10安装

初次安装5.6.24版本步骤和问题

  • 解压版的mysql
    将ZIP的压缩包解压至合适的目录
  • 配置mysql
    在mysql的根目录下找到my-default.ini文件打开编辑分别配置
    basedir = I:\eclipse j2ee\mysql-5.6.24-winx64 mysql的目录
    datadir = I:\eclipse j2ee\mysql-5.6.24-winx64\data mysql data所在的目录
    port = 3306 端口
    character-set-server=utf8 字符编码
  • 安装Mysql
    使用CMD以管理员权限运行(注意权限问题),切换到Mysql bin目录下执行mysqld -install 等待安装成功的提示
  • 启动Mysql
    执行net start mysql 等待服务启动成功
  • 使用Mysql
    执行mysql 出现以下信息就可以使用了
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 10
    Server version: 5.6.24 MySQL Community Server (GPL)
    Copyright (c) 2000, 2015, 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>
  • 修改root密码
    执行如下命令 提示以下错误
    I:\eclipseJ2ee\mysql-5.6.24-winx64\bin>mysql -u root -p
    Enter password: *
    ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
  • 解决办法
    先退出mysql
    mysql> quit
    Bye
    再停止mysql服务,执行net stop mysql,等待停止服务
    输入mysqld –skip-grant-tables 回车(启动MySQL服务的时候跳过权限表认证)
    再启动mysql服务器,执行net start mysql, 等待启动服务
    切换至mysql bin目录,输入mysql 并执行,进入mysql操作
    执行use mysql
    mysql> use mysql;
    Database changed
    继续执行update user set password=password(‘123456’) where user=’root’
    mysql> UPDATE user SET Password=PASSWORD(‘123456’) where USER=’root’;
    Query OK, 3 rows affected (0.00 sec)
    Rows matched: 3 Changed: 3 Warnings: 0
    成功后继续执行 flush privileges
    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.00 sec)
    mysql>
  • 使用修改后的密码登陆
    mysql> quit
    Bye
    退出mysql, 执行mysql -u root -p
    I:\eclipseJ2ee\mysql-5.6.24-winx64\bin>mysql -u root -p
    Enter password: * 输入修改后的root密码进行登陆
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 11
    Server version: 5.6.24 MySQL Community Server (GPL)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值