MySQL 解压缩安装
2019独角兽企业重金招聘Python工程师标准>>>
1.下载
add:https://dev.mysql.com/downloads/mysql/
2.解压
3.创建 data 、logs 目录
4.创建my.ini配置文件
以下是一个参考:
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.# The following options will be passed to all MySQL clients
[client]
password = root
port = 3306
socket = mysql# Here follows entries for some specific programs# The MySQL server
[mysqld]
port = 3306
socket = mysql
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
character-set-server=utf8
#这里是指定解压缩的mysql的根目录
basedir = F:/mamp/MAMP/bin/mysql/
#这里是指定data目录
datadir = F:/mamp/MAMP/db/mysql/# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin# binary logging format - mixed recommended
binlog_format=mixed# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin#这里是指定log 当初始化的时候,随机密码在这里获取
log-error=F:/mamp/MAMP/logs/mysql_error_log.err# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = D:\\mysql\\data\\
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = D:\\mysql\\data\\
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#当引擎是InnoDB的时候 这个值尽可能大些
innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50[mysqldump]
quick
max_allowed_packet = 16M[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M[mysqlhotcopy]
interactive-timeout
5.初始化 进入bin目录执行
mysqld --initialize
执行完成之后,data目录应该会有以下目录生成
继续查看logs目录下的日志文件,可以从中找到以下内容:
那么此处就是随机的登录密码,之后登录会用到。
6.安装服务
mysqld --install
#与之相反的是
mysqld --remove
7.启动服务
#启动
net start mysql
#重启
mysql restart
#停止
net stop mysql
8.登录 修改密码
mysql -u root -p
接着输入从日志文件得到的随机密码,进入mysql客户端。
进入客户端后,执行
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';
以上就安装完成,愉快的玩耍吧。
转载于:https://my.oschina.net/swiftloop/blog/1601203
MySQL 解压缩安装相关推荐
- MySQL解压缩安装
2019独角兽企业重金招聘Python工程师标准>>> MySQL5.6安装步骤(windows7/8_64位) 1. 下载MySQL Community Server 5.6.11 ...
- mysql 解压缩安装_[mysql] MySQL解压缩安装步骤
以前装的MySQL出问题了,只好卸载了. 又下载了一个mysql-5.6.24-win32.1432006610.zip.msi文件直接安装就行了.这里需要解压到指定目录,配置后可使用. 环境变量配置 ...
- Windows上安装Mysql解压缩版教程
1.登录mysql官网下载zip版本的mysql,我的版本是mysql-5.7.23-winx64.下面附上链接 https://dev.mysql.com/downloads/file/?id=47 ...
- win10安装MySQL解压缩版 8.0.15(非转载,较详细)
win10安装MySQL解压缩(zip)版 8.0.15(较详细) 日期:2019/3/24 环境:win10 MySQL版本:解压缩版 8.0.15 下载网址:https://dev.mysql.c ...
- 如何安装MySQL解压缩版
如何安装MySQL解压缩版 http://www.150cha.com/shujuku/mysql/291050.html 上文讲解了如何安装.配置MySQL解压缩版本. 下面详解一下我的经验. 首先 ...
- mysql解压缩包怎么安装和启动
1.下载 首先到官网下载要安装的包 地址:https://downloads.mysql.com/archives/community/ 选择对应的版本和位数,并不一定是最新版本就是最适合的,根据自身 ...
- mysql 5.7解压缩_mysql 5.7.22 解压缩安装
直接点击下载项 下载后: 2.可以把解压的内容随便放到一个目录,我的是如下目录(放到C盘的话,可能在修改ini文件时涉及权限问题,之后我就改放D盘了): D:\MySQL\MySQL Server 5 ...
- MySQL的安装配置(win7 64-bit)
MySQL的安装配置(win7 64-bit) 转,整理. MySQL 版本是 mysql-noinstall-5.1.66-winx64.zip(免安装版) mysql-workbench-gpl- ...
- nagios+mysql+ndo2安装总结
1.apache 安装 1.1下载 http://httpd.apache.org/download.cgi 1.2安装 tar zvxf httpd-2.2.6.tar.gz cd httpd-2. ...
最新文章
- cmd怎么实现Java你好_java环境配置以及如何在cmd窗口运行java代码
- java uml 为什么_Java开发为什么需要UML
- windows 修改hosts 立即生效的方法
- 公需科目必须学吗_税务师要继续教育吗,2019税务师怎样继续教育?
- 翻译(九)——Clustered Indexes: Stairway to SQL Server Indexes Level 3
- 保留凸性的方式:一个凸函数在一个随机变量上的期望仍然是凸函数
- 【转】Microsoft Graph 概述
- 【java基础知识】java.util.LinkedHashMap cannot be cast to com.XXX.XXX
- “行业爆点可期,成本过高仍然是难题”年终盘点之激光雷达
- 从三方面分析,Java程序员如何晋升为高薪Java架构师?
- 《青春无烦恼》基督之灵爱
- 介值定理究竟在讲什么?
- 路由器开发整理(1)
- C语言学习—杨辉三角的实现
- linux设备授权命令,# Linux命令
- 无人机、手持全景设备、单反制作全景的基础流程,及全景成果与地图融合
- Python爬虫爬取智联招聘(进阶版)
- 鸿蒙文化博物馆,有趣、有味、有文化!“周末儿童博物馆”在成博欢乐启幕
- IP地址更改小工具(bat命令)
- 一周市场摘抄20210222