Windows安装MySql
成功结果
安装
官网-Community --> MySql Community Server --> 压缩包
下载完成,解压后。
配置环境变量,这里的是win10系统。win+r ,搜索 sysdm.cpl (sysdm难记?System Data Management ,cpl难记?Control Panel Item ,windows可执行文件)
在mysql目录新建配置文件,my_default.ini 。命名随意~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = D:\mysql-server # datadir = D:\mysql-server\data # port = ..... # server_id = ..... #设置服务器字符集为utf8 character_set_server=utf8 collation-server=utf8_general_ci #设置mysql的安装目录 basedir = D:\mysql-server #设置mysql的数据文件存放目录 datadir = D:\mysql-server\data #设置mysql服务所绑定的端口 port = 3306 #设置mysql允许的最大连接数 max_connections=15 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M [client] #设置客户端字符集 default-character- set =utf8 [WinMySQLadmin] Server = D:\mysql-server\bin\mysqld.exe #这里路径 看自己放的位置 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES |
上面Server路径注意一下。
管理员身份打开命令行工具 cmd ,安装 mysqld -install
创建默认数据库 mysqld--initialize-insecure --user=mysql ,等待一会儿。发现 myql 下多了 data 文件夹
![](https://images2018.cnblogs.com/blog/994461/201808/994461-20180823162544625-299299271.png)
开服务 net start mysql
登陆~ 这里默认密码为空
看看官网安装教程?https://dev.mysql.com/doc/refman/8.0/en/windows-install-archive.html
图形化管理mysql,使用Navicat。
量变会引起质变。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步