install mysql

本文提供了一步一步指导,教你如何下载MySQL并进行安装配置。包括设置环境变量、安装MySQL服务、初始化数据库、配置MySQL参数及设置root账户密码等关键步骤。

download mysql

download mysql from ```http://dev.mysql.com/downloads/mysql/```

configure environment

add ```D:\mysql\bin``` to path

download the Microsoft Visual C++ 2013 Redistributable Package

https://www.microsoft.com/en-gb/download/details.aspx?id=40784select vcredist_x64.exe

register mysql service

cd D:\mysql\bin
mysqld -install

configure mysql configuration file

edit my.ini in D:\mysql
[mysqld]

basedir=D:\mysql
datadir=D:\mysql\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

initialize mysql

cd D:\mysql\bin
mysqld --initialize

start mysql server to check mysql service

net start mysql

configure mysql root account

start no password mode of mysql server

net stop mysql
mysqld --skip-grant-tables

start another cmd

mysql -u root
flush privileges;
grant all privileges on *.* to 'root'@'localhost' identified by 'mypassword' with grant option;
flush privileges;
exit;

kill mysqld.exe

taskkill /f /im mysqld.exe

start mysql again

net start mysql

use mysql

mysql -P 3306 -h localhost -u root -p

转载于:https://www.cnblogs.com/otfsenter/p/7825596.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值