
打开my.ini文件,相关配置修改如下
# 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. <strong>[</strong>mysqld<strong>]</strong> # 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. #mysql根目录 basedir ="E:mysqlmysql-5.6.24-win32" #数据文件存放目录 datadir ="E:mysqlmysql-5.6.24-win32data" # port = .....端口,默认3306 # server_id = ..... 服务实例的唯一标识 # 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 = 2Msql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES#服务端的编码方式 character-set-server=utf8 <strong>[</strong>client<strong>]</strong> #客户端编码方式,最好和服务端保存一致 loose-default-character-set = utf8 <strong>[</strong>WinMySQLadmin<strong>]</strong>Server = "E:mysqlmysql-5.6.24-win32inmysqld.exe"上面设置为了保证服务正常运行,根据自己需要调整参数,修改后要重启服务。

还是给数据库设个密码吧。输入exit退出登录。然后运行运行C:Program Filesmysql-5.6.22-win32inmysqladmin -uroot -p password <新密码> ,将<新密码>替换为你的自定义密码,然后按回车。这时会提示输入密码,其实是指的原密码,原密码因为是空,所以这里再回车即可完成设置。然后用上面的方法和新密码登入mysql,即可正常工作。
运行"show variables like "%version%";" 查看数据库相关信息

至此,整个数据库的安装完成。
虽然mysql客户端能完成所有关于数据库操作,但是黑黑的命令行界面还是让很多人望而却步,学习曲线直线上升,在此给大家推荐一个工具Navicate for mysql,个人感觉非常好用,各种操作一目了然,还有个SQLyog也不错。

以上所述是小编给大家介绍的MySQL5.6.22 绿色版 安装详细教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!