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

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

Jun 01, 2016 pm 01:15 PM
software password

绿色版本,解压缩

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

my-default.ini 改名my.ini

my.ini内容如下

1

# 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

Copy after login

打开 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;

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that Windows 11 prompts you to enter the administrator username and password to continue? How to solve the problem that Windows 11 prompts you to enter the administrator username and password to continue? Apr 11, 2024 am 09:10 AM

How to solve the problem that Windows 11 prompts you to enter the administrator username and password to continue?

How to set router WiFi password using mobile phone (using mobile phone as tool) How to set router WiFi password using mobile phone (using mobile phone as tool) Apr 24, 2024 pm 06:04 PM

How to set router WiFi password using mobile phone (using mobile phone as tool)

Tutorial on changing wifi password on mobile phone (simple operation) Tutorial on changing wifi password on mobile phone (simple operation) Apr 26, 2024 pm 06:25 PM

Tutorial on changing wifi password on mobile phone (simple operation)

Incorrect password, beware BitLocker warning Incorrect password, beware BitLocker warning Mar 26, 2024 am 09:41 AM

Incorrect password, beware BitLocker warning

How to switch between dual systems and reset password on Huawei mobile phone How to switch between dual systems and reset password on Huawei mobile phone Feb 19, 2024 am 09:05 AM

How to switch between dual systems and reset password on Huawei mobile phone

How to Remove Windows 10 Lock Screen Password Now How to Remove Windows 10 Lock Screen Password Now Jan 09, 2024 pm 03:33 PM

How to Remove Windows 10 Lock Screen Password Now

What is the name of the software that can unlock all wifi passwords (recommended mobile software to get connected wifi passwords with one click) What is the name of the software that can unlock all wifi passwords (recommended mobile software to get connected wifi passwords with one click) Apr 02, 2024 pm 06:46 PM

What is the name of the software that can unlock all wifi passwords (recommended mobile software to get connected wifi passwords with one click)

How to use Passkey for your Microsoft account How to use Passkey for your Microsoft account Feb 19, 2024 am 11:03 AM

How to use Passkey for your Microsoft account

See all articles