时间:2021-07-01 10:21:17 帮助过:4人阅读
2)bin目录下创建my.ini文件
- <span style="color: #000000;"># For advice on how to change settings please see
- # http:</span><span style="color: #008000;">//</span><span style="color: #008000;">dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html</span>
- # *** DO NOT EDIT THIS FILE. It<span style="color: #800000;">‘</span><span style="color: #800000;">s a template which will be copied to the</span>
- # *** <span style="color: #0000ff;">default</span> location during install, and will be replaced <span style="color: #0000ff;">if</span><span style="color: #000000;"> you
- # </span>***<span style="color: #000000;"> upgrade to a newer version of MySQL.
- [mysqld]
- # Remove leading # and </span><span style="color: #0000ff;">set</span> to the amount of RAM <span style="color: #0000ff;">for</span><span style="color: #000000;"> the most important data
- # cache </span><span style="color: #0000ff;">in</span> MySQL. Start at <span style="color: #800080;">70</span>% of total RAM <span style="color: #0000ff;">for</span> dedicated server, <span style="color: #0000ff;">else</span> <span style="color: #800080;">10</span>%<span style="color: #000000;">.
- # innodb_buffer_pool_size </span>=<span style="color: #000000;"> 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 </span><span style="color: #0000ff;">set</span>, remove the # and <span style="color: #0000ff;">set</span> <span style="color: #0000ff;">as</span><span style="color: #000000;"> required.
- basedir </span>= D:\dev\Utils\Java\mysql-<span style="color: #800080;">5.7</span>.<span style="color: #800080;">28</span>-<span style="color: #000000;">winx64
- datadir </span>= D:\dev\Utils\Java\mysql-<span style="color: #800080;">5.7</span>.<span style="color: #800080;">28</span>-<span style="color: #000000;">winx64\data
- port </span>= <span style="color: #800080;">3306</span><span style="color: #000000;">
- # server_id </span>=<span style="color: #000000;"> .....
- # Remove leading # to </span><span style="color: #0000ff;">set</span> options mainly useful <span style="color: #0000ff;">for</span><span style="color: #000000;"> reporting servers.
- # The server defaults are faster </span><span style="color: #0000ff;">for</span><span style="color: #000000;"> transactions and fast SELECTs.
- # Adjust sizes </span><span style="color: #0000ff;">as</span><span style="color: #000000;"> needed, experiment to find the optimal values.
- # join_buffer_size </span>=<span style="color: #000000;"> 128M
- # sort_buffer_size </span>=<span style="color: #000000;"> 2M
- # read_rnd_buffer_size </span>=<span style="color: #000000;"> 2M
- sql_mode</span>=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
6、运行mysql
以管理员身份运行cmd,win10菜单栏里找到
依次执行命令:mysqld --install
mysqld --initialize
net startt mysql
7、登录mysql
mysql -uroot -p
刚开始时,你随机输入会提示错误,不要慌。去我们刚才配置的data目录下找到一个.err的文件
输入密码后就成功登录了。
8、修改mysql密码
1)如果你此时进入到mysql中,使用exit退出
2)net stop mysql 停止mysql服务
3)mysqld --skip-grant-tables 使用无验证方式启动mysql服务
4)使用管理员权限打开新的cmd命令行窗口,输入mysql 你就可以无密码进入到mysql中
5)use mysql
6)UPDATE user SET authentication_string = PASSWORD(‘新密码‘) WHERE user = ‘root‘;
再次登录使用设置的新密码就可以了!
希望能够帮到大家!!!
超级详细Mysql安装步骤图解
标签:mod root leading reporting sort 英文 ict char ini文件