【关于安装mysql5.6的一些问题总结】
1:安装msyql5.6介质(mysql-5.6.24-winx64.msi)以后没有myslq服务:
解决:
管理员身份cmd进入bin目录:
mysqld.exe -install
Service successfully installed
启动服务即可
2:修改mysql root用户没有密码问题:
解决:
mysql -u root -p 直接回车,无需输入密码就可以进入数据库了。 此时在命令行下执行 use mysql (切换到系统数据库)
执行:update user set password=PASSWORD("root") where user='root';重启mysql服务即可
3:修改mysql字符编码:
解决:
将mysql的安装目录(C:\Program Files\MySQL\MySQL Server 5.6)的my-default.ini复制一份,重命名为my.ini(因为mysql5.6没有my.ini文件)
添加:
[mysql]
port=3306
default-character-set=utf8
[mysqld]
character-set-server=utf8
重启服务即可:
mysql> show variables like '%character%';
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\ |
+--------------------------+---------------------------------------------------------+
附:完整配置文件内容:
[client]
#password =1234
# pipe
# socket=mysql
port=3306
default-character-set=utf8
[mysql]
port=3306
default-character-set=utf8
[mysqld]
port=3306
basedir="C:\Program Files\MySQL\MySQL Server 5.6"
datadir="C:\Program Files\MySQL\MySQL Server 5.6\data"
character-set-server=utf8
default-storage-engine=INNODB
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# Enable Windows Authentication
# plugin-load=authentication_windows.dll
# General and Slow logging.
log-output=NONE
general-log=0
general_log_file="WANGZHANGJIE.log"
slow-query-log=0
slow_query_log_file="WANGZHANGJIE-slow.log"
long_query_time=10
# Binary Logging.
# log-bin
# Error Logging.
log-error="WANGZHANGJIE.err"
max_connections=100
query_cache_size=0
table_open_cache=2000
tmp_table_size=20M
thread_cache_size=9
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=39M
key_buffer_size=8M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
#*** INNODB Specific options ***
# innodb_data_home_dir=0.0
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=97M
innodb_log_file_size=48M
innodb_thread_concurrency=9
# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.
innodb_autoextend_increment=64M
innodb_buffer_pool_instances=8
# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000
# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before
# it can be moved to the new sublist.
innodb_old_blocks_time=1000
# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.
innodb_open_files=300
# When this variable is enabled, InnoDB updates statistics during metadata statements.
innodb_stats_on_metadata=0
# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table
# in a separate .ibd file, rather than in the system tablespace.
innodb_file_per_table=1
# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.
innodb_checksum_algorithm=0
back_log=70
flush_time=0
join_buffer_size=256K
max_allowed_packet=4M
max_connect_errors=100
open_files_limit=4110
query_cache_type=0
sort_buffer_size=256K
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000
最新文章
- struts2国际化
- CF720F
- 夺命雷公狗-----React---9--map数据的遍历
- Java日期时间处理常用方法
- Android 高手进阶之自定义View,自定义属性(带进度的圆形进度条)
- 神器——Chrome开发者工具(一)
- css中table-layout:fixed 属性的用法
- 欢迎使用skymvc框架,简单易用的php框架
- CSS浏览器兼容性----Hack
- Java——(六)Collection之Queue集合
- unity——使用角色控制器组件+射线移动
- Openlayer 3 最简单的弹出框
- 第一个远程javaweb项目测试全过程
- 剑指Offer——Trie树(字典树)
- python 黑魔法收集--已结
- nginx添加ssl证书
- checkpoint防火墙SmartDashboard登录出错
- 20155205 2016-2017-2 《Java程序设计》第8周学习总结
- “Hello World!”团队第五周第七次会议
- ambari关于ranger的一个大坑----端口永远是3306,需要手动修改
热门文章
- Oracle可能会遇到问题和解决方法
- BZOJ2034 [2009国家集训队]最大收益
- BZOJ 2058 [Usaco2010 Nov]Cow Photographs:逆序对【环上最小逆序对】
- User Agent注入攻击及防御
- django1.8.3搭建博客——2 django web 开发指南阅读笔记
- hbase_学习_00_资源帖
- hbase_异常_02_hbase无法访问16010端口
- Git_学习_01_ 常用 Git 命令清单
- JavaWeb_常用功能_01_文件上传
- (转)gcov、lcov与genhtml 使用心得