win10下安装mysql免安装版

    xiaoxiao2021-03-25  103

    win10下安装mysql免安装版

    mysql版本:mysql-5.6.35-winx64 点击下载mysql-5.6.35-winx64

    解压mysql-5.6.35-winx64.zip,为了后面查看哪个版本的mysql,可用延用这个命名mysql-5.6.35-winx64。

    将这个copy到你的想指定的目录下,如D:\mysql-5.6.30-winx64 。

    将bin目录加入到环境变量path中,D:\mysql-5.6.35-winx64\bin 。

    配置mysql,管理员进入cmd安装,成功后会显示Service successfully installed.:

    C:\WINDOWS\system32>mysqld --install

    安装完后,管理员下配置连接mysql的通信,也就是启动mysql服务,成功后会显示MySQL服务正在启动,MySQL服务已经启动成功。

    C:\WINDOWS\system32>net start mysql

    其实这个时候在cmd中键入mysql,就可以进入到mysql中了,只是不用键入用户和密码而已。此时可键入help查看相关命令的使用。

    Microsoft Windows [版本 10.0.14393] (c) 2016 Microsoft Corporation。保留所有权利。 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.35 MySQL Community Server (GPL) Copyright (c) 2000, 2016, 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>help

    进入mysql shell 后就可以创建用户和密码了,创建用户root,密码123456,可以访问IP为localhost,创建成功后刷新权限;举一反三:相同的方法为不同的用户、IP设置访问的账户。

    C:\Users\oncec> mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456'); mysql> FLUSH PRIVILEGES;

    当用Navicat for Mysql连接mysql时,可用用户root,密码123456,IP为localhost,端口3306连接mysql。

    当不用mysql时,可停止服务:

    停止mysql

    C:\WINDOWS\system32>net stop mysql

    移除mysql

    C:\WINDOWS\system32>mysql --remove

    参考文档:https://dev.mysql.com/doc/refman/5.6/en/preface.html

    转载请注明原文地址: https://ju.6miu.com/read-15395.html

    最新回复(0)