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 ...
随机推荐
- git pull命令模式
git pull 默认等于 git fetch + git mergegit pull --rebase 等于 git fetch + git rebasegit pull -–squash 等于 g ...
- 分布式文件系统之Glusterfs
1.环境规划如下 centos7.4 三个节点一块 sdb 3G大小的测试硬盘 2.Glusterfs 卷的类型比较多,这里我们测试最常用的一种 Distributed Replicate ...
- iOS飘雪的动画小demo
ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController{ UIImage ...
- CF126B password&&HDU 4763 Theme Section
http://acm.hdu.edu.cn/showproblem.php?pid=4763 http://codeforces.com/problemset/problem/126/B 这两个题都是 ...
- AVRStudio 6 设置F_CPU时钟频率
具体如下: 1>右键项目属性 2>根据语言选择一下,C或C++
- c++学习重点分析
C++是一种语言,仅仅是它的语法.特性.标准类库就已经是一门非常高深的课程,所以在开始学习的时候,必须先要打好基础.要知道当我们在学习它的时候重点应该注意什么. 一.#include “filena ...
- SQL Server 2005 无法连接到 127.0.0.1
[问题描述]如果连接本机的数据库服务器,服务器名称可填: 127.0.0.1或localhost或本机机器全名(比如HOME),有时候用本机机器名可以登录SQL Server 2005,但用127.0 ...
- (4)django mtv模式
mtv模式 http://blog.csdn.net/dbanote/article/details/11338953 models 官方介绍 https://docs.djangoproject.c ...
- 模糊测试工具Simple Fuzzer
模糊测试工具Simple Fuzzer 模糊测试是一种不同于渗透测试的漏洞检测方式.它向目标系统发送各种非预期的输入,然后通过监视异常结果来发现漏洞.Kali Linux虽然作为渗透测试系统平台, ...
- [UR #3] 核聚变反应强度
次大公约数就是gcd再除以其最小质因子(如果有的话).可以发现要求的sgcd 的前身gcd都是a1的约数,所以把a1质因数分解直接做就行了. #include<bits/stdc++.h> ...