how to install Mysql client and desktop version/workbench

6.1 MySQL数据库
MySQL下载与安装
进入mysql官网,找到社区版MYSQL下载地址:https://dev.mysql.com/downloads/
在这里插入图片描述
在这里插入图片描述
second one.zip for download
https://dev.mysql.com/downloads/workbench/
在这里插入图片描述

使用管理员身份打开cmd,并cd到bin目录下,进行初始化数据库存储文件:mysqld.exe --initialize --console
问题:安装的时候提示data目录已经存在——data目录是存储数据的目录
在这里插入图片描述

解决方式:1 删除data目录。2 初始化数据库存储文件时,制定一个配置文件其中data目录制定一个空目录。
对于初学者建议直接删除data目录:
在这里插入图片描述

删除data目录后,重新执行命令如下图:mysqld.exe --initialize --console
在这里插入图片描述

(A temporary password is generated for root@localhost: ojEOpe9#eXX-)
注意:其结果中生成了root账户的默认密码,需要记住后使用。
创建mysql的Windows服务:
mysqld.exe -install
删除mysql服务:
mysqld.exe -remove mysql
启动服务命令:
net start mysql
停止服务命令:
net stop mysql
登录和修改密码
上面安装时创建的root用户密码是零时密码,需要在有效期内修改。过期会导致问题。
cmd下等mysql: mysql -uroot -ppassword
mysql -uroot -p16tfDtkgQ5#X
mysql -uroot -pojEOpe9#eXX-
登录后修改密码:ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘自己想要设置的新密码’;
alter user ‘root’@‘localhost’ identified by ‘root’;

(set user name and password the same as root)

alter user ‘root’@‘localhost’ identified by ‘’;

PS1: we need to install VC++ 2019

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

在这里插入图片描述

在这里插入图片描述

C++package

  1. how to change directory on CMD run as administrator

first change directory to specific driver disk >> secondly cd to specific folders under the specified driver disk

C:\>cd Windows\System32

C:\Windows\System32>cd ..

C:\Windows>
C:\Windows>D:

C:\Windows\System32>D:

D:\>cd D:\LeStoreDownload

D:\LeStoreDownload>

PS2: coodinate the path for easily logging on mysql anywhere of PC

在这里插入图片描述

C:\Windows\System32>mysql -u root -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.4.0 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

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.

P3) workbench installation or uninstallation/removal are the same exe fil

VC++ 2019 over needed to installed as well as above shown

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值