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-winx64datadir = 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 5.5创建线性Hash分区表,并将表文件分布到不同的物理磁盘上_MySQL
下一篇: MySQL databases are all setup in BuildAPI-app docker contain_MySQL
推荐阅读
-
MySQL5.7.20解压版安装和修改root密码的教程
-
Windows下mysql5.7.10安装配置方法图文教程
-
Windows server 2008 r2下MySQL5.7.17 winx64安装版配置方法图文教程
-
Ubuntu Server 16.04下mysql8.0安装配置图文教程
-
CentOS7.x卸载与安装MySQL5.7的操作过程及编码格式的修改方法
-
MySql增加用户、授权、修改密码等语句
-
CentOS安装mysql5.7 及简单配置教程详解
-
MYSQL基础之连接MYSQL、修改密码、添加用户
-
mysql 5.7.17 winx64.zip安装配置方法图文教程
-
MySQL5.6.31 winx64.zip 安装配置教程详解