当前位置:网站首页>mysql5.7.27安装之windows8.1 64
mysql5.7.27安装之windows8.1 64
2022-06-22 15:25:00 【MarshalEagle】
1、将安装包解压到指定目录。
2、设置环境变量,在path项添加mysql的bin路径。例如:E:\database\mysql-5.7.27-winx64\bin;
3、在E:\database\mysql-5.7.27-winx64\bin目录下创建my.ini文件,填写如下内容:

[mysql] #设置mysql客户端默认字符集 default-character-set=utf8 [mysqld] #设置7716端口 port = 7716 #设置mysql的安装目录 basedir=E:\database\mysql-5.7.27-winx64\bin #设置mysql数据库的数据的存放目录 datadir=E:\database\mysql-5.7.27-winx64\bin\data #允许最大连接数 max_connections=1000 #服务端使用的字符集默认为8比特编码的latin1字符集 character-set-server=utf8 #创建新表时将使用的默认存储引擎 default-storage-engine=INNODB

4、初始化数据库。
以管理员权限运行cmd,执行:mysqld --initialize-insecure --user=mysql。
若遇到报错,将data文件夹删除后重新执行即可。
5、以管理员权限运行cmd,通过cmd命令进入mysql的bin文件夹中,输入命令:“mysqld –install”,出现“service successfully installed”表示安装成功。
6、启动MySql。输入“net start mysql”启动MySQL。
7、登录mysql。输入“mysql –u root -p”登录MySQL,出现输入密码,直接按回车即可。
8、修改root密码
mysql>use mysql;
mysql>update user set authentication_string = password('新密码'),password_last_changed=now() where user='root';mysql>use mysql;
mysql>flush privileges;9、创建新用户并赋权限。
mysql>CREATE USER '用户名'@'%' IDENTIFIED BY '密码';
mysql>GRANT ALL ON *.* TO '用户名'@'%';
-----------------------------------------------------------------------------------------------------------------------------------------
遗忘密码,充值密码:
编辑my.cnf允许空密码登录
1 [[email protected] ~]# vi /etc/my.cnf 2 #在[mysqld]下加入一行 3 skip-grant-tables=1
重新启动Mysql服务
1 [[email protected] ~]# systemctl restart mysqld.service
使用Root登录数据库、使用mysql数据库、修改root密码、退出数据库
1 [[email protected] ~]# mysql -u root 2 mysql> use mysql; 3 mysql> update user set authentication_string = password('新密码'),password_last_changed=now() where user='root'; 4 mysql> flush privileges;
再次打开my.cnf,将skip-grant-tables=1删掉,保存退出
1 [[email protected] ~]# vi /etc/my.cnf 2 #删除skip-grant-tables=1
重启Mysql服务
1 [[email protected] ~]# systemctl restart mysqld.service
边栏推荐
猜你喜欢

Idea installation summary

如何为政企移动办公加上一道“安全锁”?

6.gui (graphics, filling)

【C语言】深度剖析指针和数组的关系

超出文本部分用省略号表示
![[wechat applet custom bottom tabbar]](/img/04/2ea4ab3fd8571499190a9b3c9990b2.png)
[wechat applet custom bottom tabbar]
![[pop up box 2 at the bottom of wechat applet package]](/img/31/266e6a1f4200347c9324ea37b78562.png)
[pop up box 2 at the bottom of wechat applet package]

【小程序项目开发-- 京东商城】uni-app开发之配置tabBar & 窗口样式
![[wechat applet to obtain the height of custom tabbar] is absolutely available!!!](/img/ed/7ff70178f03b50cb7bec349c1be5e0.png)
[wechat applet to obtain the height of custom tabbar] is absolutely available!!!

二叉树练习第二弹
随机推荐
scala之闭包函数浅知
【小程序项目开发-- 京东商城】uni-app开发之配置tabBar & 窗口样式
spark与mysql:Did not find registered driver with class com.mysql.jdbc.Driver
面对默认导入失败的情况
代码扫描工具扫出的 Arrays.asList 使用BUG
全球首款AR隐形眼镜,元宇宙入口这次真的打开了?
How to use IDM to accelerate Baidu cloud
Add a millennial sign to a number (amount in millennia)
机器学习笔记 - HaGRID—手势识别图像数据集简介
【微信小程序封装底部弹出框】一
In case of default import failure
What is restful and what rules should be followed when designing rest APIs?
首个赛博格人陨落背后:科技与渐冻症的极限赛跑
How to add a "security lock" to the mobile office of government and enterprises?
2022年中国重卡智能化升级专题研究
for..of vs. for..in 语句
Consumption monitoring of Prometheus monitoring [consult exporter]
Lecture 6 of slam Lecture 14 -- nonlinear optimization
Learning about ABAP program tuning (IV) loop where key
接口幂等性设计