mysql5.7.18安装问题总结
来源:互联网 发布:ccer数据库 豆掰 编辑:程序博客网 时间:2024/06/05 20:07
1、默认安装后需要配置mysql环境变量
变量名任意值
变量值:mysql安装路径\bin
如果不设置环境变量,doc命令如果没切换到正确路径可能找不到mysql相关命令
2、安装完成后如果远程连接被拒绝
方法一:
改表法
mysql -u root -p
mysql;use mysql;
mysql;select 'host' from user where user='root';
mysql;update user set host = '%' where user ='root';
mysql;flush privileges;
mysql;select 'host' from user where user='root';
方法二
授权法
mysql -u root -p;
mysql GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;
mysql flush privileges;
3、查看mysql字符集
show variables like '%char%';
4 mysql初始化启动.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.
[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 = "E:\mysql-5.7.18-winx64"
#数据存放目录
# datadir = "E:\mysql-5.7.18-winx64\data"
# 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 = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#服务端编码方式
character-set-server=utf8
[client]
loose-default-character-set=utf8
[WinMysqladmin]
Server="E:\mysql-5.7.18-winx64\bin\mysqld.exe"
5、执行mysql初始化sql脚本实例
source 本地sql脚本绝对路径
如:source c:\init.sql;
变量名任意值
变量值:mysql安装路径\bin
如果不设置环境变量,doc命令如果没切换到正确路径可能找不到mysql相关命令
2、安装完成后如果远程连接被拒绝
方法一:
改表法
mysql -u root -p
mysql;use mysql;
mysql;select 'host' from user where user='root';
mysql;update user set host = '%' where user ='root';
mysql;flush privileges;
mysql;select 'host' from user where user='root';
方法二
授权法
mysql -u root -p;
mysql GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;
mysql flush privileges;
3、查看mysql字符集
show variables like '%char%';
4 mysql初始化启动.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.
[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 = "E:\mysql-5.7.18-winx64"
#数据存放目录
# datadir = "E:\mysql-5.7.18-winx64\data"
# 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 = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#服务端编码方式
character-set-server=utf8
[client]
loose-default-character-set=utf8
[WinMysqladmin]
Server="E:\mysql-5.7.18-winx64\bin\mysqld.exe"
5、执行mysql初始化sql脚本实例
source 本地sql脚本绝对路径
如:source c:\init.sql;
阅读全文
0 0
- mysql5.7.18安装问题总结
- mysql5.6.27安装 总结
- 阿里云CentOS7下mysql5.6安装问题总结
- CentOS7.2 安装mysql5.7初始密码问题总结
- mysql5.7安装遇到的问题总结,持续更新
- mysql5.7.18安装时遇到的问题
- mysql5.5安装 问题
- Mysql5.7安装问题
- mysql5.7.12安装问题
- Mysql5.7安装问题
- mysql5.7.12版本安装总结
- MySQL5.5编译安装问题
- mysql5.7.18安装 密码恢复、
- 安装mysql5.7.18
- centos7安装mysql5.7.18
- Mysql5.7.18下载安装
- ubuntu 安装MySQL5.7.18
- MySQL5绿色版windows下安装总结
- 【程序人生】计算机界巾帼英雄简史
- java.lang.NoSuchFieldError: No field title of type I
- 打印html时设置去掉页眉页脚 简单一行代码搞定(记录一下)
- React Native实现图片文本混合显示
- 《七大排序算法》(五)之堆排序(Java实现)
- mysql5.7.18安装问题总结
- Android Studio中进行单元测试
- 中国国家创新指数升至世界第17位
- NYOJ 27 水池数目
- 线上服务CPU100%问题快速定位实战
- 使用jquery中的$.Ajax 和$.post 发送请求 (基础写法)
- 进程间通信方式
- 华为面试题-字典序
- mysql主从设计