mysql 配置 安装和 root password 更改
第一步:
修改my.ini文件,替换为以下内容 (skip_grant_tables***重点)
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/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 % of total RAM for dedicated server, else %.
# 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 = .....
# datadir = .....
# port = .....
# 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 #########################################################
[client]
port=
default-character-set=utf8
[mysqld]
skip_grant_tables
port=
character_set_server=utf8
basedir=E:\mysql-5.7.-winx64
#解压目录
datadir=E:\mysql-5.7.-winx64\data
#解压目录下data目录
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
E:\mysql-5.7.-winx64\bin\mysqld.exe
########
第二步:
进入到MySQL的安装目录,按 shift+(鼠标右键) 点击命令行窗口 使用mysqld --initialize 进行初始化 (会在安装目录下创建一个data文件夹)
第三步:
在安装目录文件夹下 进入命令行模式 shift+(鼠标右键) 使用 net start mysql 启动服务
使用 mysql -uroot -p无密码登录
进入之后
mysql> use mysql;
mysql> update user set authentication_string=password("123") where user="root";(别忘了最后加分号)
mysql>flush privileges;
mysql>quit;
第四步:
进入my.ini文件将skip_grant_tables注释
重新进入命令行
net stop mysql
net start mysql (重新启动服务)
mysql -uroot -p
(使用更改后的密码登录)
succeed;
************************************************************************************************************************
最后温馨提示:如果net start mysql 提示无法启动服务,且没有提示错误 可以将 data 文件夹删除 重新初始化 启动一下
mysql 配置 安装和 root password 更改的更多相关文章
- mysql 配置安装
1. 下载: mysql-5.7.20是解压版免安装的,mysql-5.7.20下载地址:http://dev.mysql.com/downloads/mysql/ 直接下载,无需注册和登录. ...
- Mysql 免安装版 root@localhost第一次密码设置
方法1: 用SET PASSWORD命令 mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass ...
- MYSQL更改root password时遇到Access Denied的解决办法
今天在公司虚拟机上装MYSQL之后需要修改root password,然而遇到这样的错误: Access denied for user 'root'@'localhost' (using passw ...
- Ubuntu 12.04下mysql的安装与配置
转自:http://blog.csdn.net/ichsonx/article/details/9285935 准备 0. 获取 mysql-5.5.15-linux2.6-i686.tar.gz ...
- rpm安装MySQL5.5后配置,在centos5上;mysql编译安装在centos6.5上;
[1] 没有/etc/my.cnf: rpm包安装的MySQL是不会安装/etc/my.cnf文件的:处理:cp /usr/share/mysql/my-huge.cnf /etc/my.cnf [2 ...
- MYSQL介绍安装及一些问题解决
一.简介 MySQL是最流行的开放源码SQL数据库管理系统,它是由MySQL AB公司开发.发布并支持的.有以下特点: MySQL是一种数据库管理系统. MySQL是一种关联数据库管理系统. MySQ ...
- CentOS6.5 MySQL 配置设置总结笔记
三.登录MySQL 登录MySQL的命令是mysql, mysql 的使用语法如下: mysql [-u username] [-h host] [-p[password]] [dbname] u ...
- linux下安装mysql(rpm安装)
Mysql 5.7.29安装步骤 1.首先卸载自带的Mysql-libs(如果之前安装过mysql,要全都卸载掉) rpm -qa | grep -i -E mysql\|mariadb | xarg ...
- (转)linux下mysql的安装过程
最近在linux安装了mysql,根据网上收集的资料和个人的操作过程,大概做了个整理,以便以后进行参考回顾. 1.下载mysql-5.1.36.tar.gz,并且解压. tar -xzvf mysql ...
随机推荐
- Codeforces Round #323 (Div. 2) C 无敌gcd 数学/贪心
C. GCD Table time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
- 【HDOJ5510】Bazinga(KMP)
题意:给定n个由小写字母组成的字符串,第i个字符串为a[i],求最大的j满足存在1<=i<j,a[i]不是a[j]的子串,无解输出-1 T<=50,n<=500,len[i]& ...
- DataReader和Dataset的性能比较 以及什么时候用dataset什么时候用DataReader
原文发布时间为:2009-11-13 -- 来源于本人的百度文章 [由搬家工具导入] DataReader和Dataset的性能比较 以及什么时候用dataset什么时候用DataReader 【技术 ...
- hdu 2243 考研路茫茫——单词情结 AC自动机 矩阵幂次求和
题目链接 题意 给定\(N\)个词根,每个长度不超过\(5\). 问长度不超过\(L(L\lt 2^{31})\),只由小写字母组成的,至少包含一个词根的单词,一共可能有多少个? 思路 状态(AC自动 ...
- compensation 在 spec 上的意義
compensation 翻譯為補償, 之前觀念都認為補償都是正的, 原來補償也可以負的, 例子: 電池充電電流在 10 - 45 度為 1800 mA, 在 0 - 10 度時,jeita 補償 1 ...
- jmeter登录测试
测试步骤: 1.测试计划--右键添加--Threads--线程组 2. 线程组--右键--http信息头管理器 输入Content-Type=application/json,表示接口请求的默认设置: ...
- poj 2299(离散化+树状数组)
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 53777 Accepted: 19766 ...
- RadioGroup动态添加RadioButton,并且获得事件
由于有许多的RadioButton是动态的,不是固定的一些,所以需要在代码中,动态的添加到RadioGroup中,下面是我的实现方法. 1.添加RadioButton到RadioGroup中 Radi ...
- Android关于版本更新下载安装之踩坑记录(针对7.0以上)
最近刚刚把古老的项目targetSdk版本升级到26,升级之前是19(非常非常古老了).那么升级后一些问题开始出现. Android 8.0 (Android O)为了针对一些流氓软件引导用户安装其他 ...
- 迷宫问题(DFS,BFS)
/******************************** 啊哈!算法 深度优先搜索算法 迷宫问题 输入: 5 4 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 ...