Mysql安装配置,修改初试密码。

绿色版本,解压缩

D:\Software\mysql-advanced-5.6.18-winx64

my-default.ini 改名my.ini

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.
[client]
default-character-set=utf8

[mysqld]
character_set_server=utf8
# 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 = D:\Software\mysql-advanced-5.6.18-winx64
datadir = D:\Software\mysql-advanced-5.6.18-winx64\data
# 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

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

打开 Windows 环境变量设置, 新建变量名 MYSQL_HOME , 变量值为 MySQL 安装目录路径,
这里为 D:\Software\mysql-advanced-5.6.18-winx64

在 环境变量 的 Path
变量中添加 ;%MYSQL_HOME%\bin;

安装 MySQL 服务, 打开Windows命令提示符,
执行命令: mysqld --install MySQL
--defaults-file="D:\Software\mysql-advanced-5.6.18-winx64\my.ini"

启动: net start MySQL

停止: net stop MySQL

卸载: sc delete MySQL

修改密码:

mysql -u root -p
Enter
password:
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 1
Server
version: 5.1.32-community MySQL Community Edition (GPL)

Type
‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the
buffer.

mysql>use mysql

mysql> UPDATE user SET password=PASSWORD(’新密码’) WHERE
User=’root’;

mysql> FLUSH PRIVILEGES;

mysql>quit;

Mysql安装配置,修改初试密码。

时间: 2024-10-22 10:48:27

Mysql安装配置,修改初试密码。的相关文章

windows MYSQL 安装及修改root密码

官网下载zip包,我下载的是64位的: 下载地址:https://dev.mysql.com/downloads/mysql/ 下载zip的包: 下载后解压:(解压在哪个盘都可以的) 我放在了这里 E:\web\mysql-8.0.11-winx64 ,顺便缩短了文件名,所以为 E:\web\mysql-8.0.11. 下载完后,我们将 zip 包解压到相应的目录,这里我将解压后的文件夹放在 C:\web\mysql-8.0.11 下. 接下来我们需要配置下 MySQL 的配置文件 打开刚刚解压

openvpn+mysql安装配置

科普: 1.当今流行的4种vpn:pptp l2tp(相比pptp支持隧道验证) ipsec(cisco) sslvpn(openvpn). 2.openvpn可用于代理http:不同机房间服务器安装连接等. 以下是本人根据搜集的相关文档,重新整理,以备查阅. ====================================================================================== 实验环境: CentOS release 6.3 x64 外网:

Linux Apache php MySQL 安装配置(Centos 6.4 yum安装)

一.yum准备 1.Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器. 基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载.安装. 2.在安装软件时报’Couldn't resolve host 'mirrorlist.centos.org‘ 解决:打开文件/etc/resolv.conf在其中添加: (添

mysql数据库如何修改root密码?

mysql数据库如何修改root密码?

Redhat下Mysql安装配置

环境信息 ------------------------------------------------------------ RHEL 6 -x86_64 yum(如未安装yum,请先安装yum,参考:安装及源配置) ------------------------------------------------------------ 安装mysql yum搜索mysql yum search mysql 搜索结果如下 MySQL-python.x86_64 : An interface

MYSQL grant 与 修改用户密码

MYSQL 创建用户,并授权,修改密码. 创建用户并将所有权限,授权给LAW create user [email protected]: grant all privileges on *.* to [email protected] identified by "";   ----OK 创建本地用户空密码,并授予相关选择,更新等权限,且只能作用于mysql数据库. create user [email protected]; grant select,update,insert o

MySQL下载、安装和修改root密码

一.下载地址:MySQL_5.6.22_winx64_XiaZaiBa :http://rj.baidu.com/soft/detail/12585.html?ald 二.安装软件,安装到指定的路径,这里为C:\Program Files\MySQL\MySQL Server 5.6\,可以参考  http://www.jb51.net/article/23876.htm 三.以管理员打开开命令提示符,输入cd C:\Program Files\MySQL\MySQL Server 5.6\bi

mysql安装并且修改密码

CentOS下安装mysql: yum install -y mysql-server 安装完毕后,直接输入msyql不需要密码就可以登录 修改mysql登录密码: mysql>update user set password=PASSWORD('密码')where user='用户名'; mysql>flush privileges; mysql>quit;退出 然后输入mysql -uroot -p 输入登录密码. 修改远程登录密码: mysql>GRANT ALL ON *.

Linux MySQL安装配置

官方下载地址:http://dev.mysql.com/downloads/mysql/ 1. 下载合适的版本,解压到 /usr/local/mysql 目录下: 2. 进行到 /usr/local/mysql 目录下,创建 data/mysql 目录,后面将会设置把数据库保存在此目录下: 3. 添加用户和用户组 #添加用户组 groupadd mysql #添加用户mysql 到用户组mysql useradd -g mysql mysql 3.1 useradd -r -s /sbin/no