mysql.zip免安装版配置_MySQL
MYSQL ZIP免安装版配置
1. 下载MySQL 选择自己想要的.本次安装.我使用的是mysql-5.6.17-winx64
地址:http://dev.mysql.com/downloads/mysql/
2. 解压zip 文件. 在mysql 的根目录下找到 my-default.ini 复制出一个 my.ini 文件, 根据你需要的位置修改 my.ini 文件
a)在[mysqld]下追加
-------
basedir = "d://mysql"
datadir = "d://mysql//data"
character-set-server = utf8
-------
b) 在[client]下追加
-------
default-character-set = utf8
# 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.[mysqld]# 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 = .....# datadir = .....# port = .....# server_id = ..... basedir =D:/work/mysql-5.6.17-winx64datadir =F:/db-data/mysqlcharacter-set-server = utf8 # 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 [client]default-character-set = utf8
3. 启动服务
保存
my.ini
的配置,然后打开命令行切换到mysql解压目录下的bin 目录;
执行 mysqld.exe console 命令测试一下
D:/work/mysql-5.6.17-winx64/bin>mysqld.exe console2014-04-22 19:11:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
然后执行 mysqld.exe console 命令启动mysql
D:/work/mysql-5.6.17-winx64/bin>mysqld.exe --console2014-04-22 19:11:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2014-04-22 19:11:33 5624 [Note] Plugin 'FEDERATED' is disabled.mysqld.exe: Table 'mysql.plugin' doesn't exist2014-04-22 19:11:33 5624 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.2014-04-22 19:11:33 5624 [Note] InnoDB: Using atomics to ref count buffer pool pages2014-04-22 19:11:33 5624 [Note] InnoDB: The InnoDB memory heap is disabled2014-04-22 19:11:33 5624 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions2014-04-22 19:11:33 5624 [Note] InnoDB: Compressed tables use zlib 1.2.32014-04-22 19:11:33 5624 [Note] InnoDB: Not using CPU crc32 instructions2014-04-22 19:11:33 5624 [Note] InnoDB: Initializing buffer pool, size = 128.0M2014-04-22 19:11:33 5624 [Note] InnoDB: Completed initialization of buffer pool2014-04-22 19:11:33 5624 [Note] InnoDB: Highest supported file format is Barracuda.2014-04-22 19:11:33 5624 [Note] InnoDB: 128 rollback segment(s) are active.2014-04-22 19:11:33 5624 [Note] InnoDB: Waiting for purge to start2014-04-22 19:11:33 5624 [Note] InnoDB: 5.6.17 started; log sequence number 16006072014-04-22 19:11:33 5624 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: dcd35109-ca0e-11e3-a872-003018a05bef.2014-04-22 19:11:33 5624 [Note] Server hostname (bind-address): '*'; port: 33062014-04-22 19:11:33 5624 [Note] IPv6 is available.2014-04-22 19:11:33 5624 [Note] - '::' resolves to '::';2014-04-22 19:11:33 5624 [Note] Server socket created on IP: '::'.2014-04-22 19:11:33 5624 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist<br>
注:这里出现异常 :Table 'mysql.user' doesn't exist 是因为我没有吧数据文件复制到 my.ini 里面配置的路径下,
数据文件是在 mysql 解压目录的下 的 data 目录, 吧整个目录里的内容复制到配置文件里写的目录里,然后启动
D:/work/mysql-5.6.17-winx64/bin>mysqld.exe --console2014-04-22 19:16:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2014-04-22 19:16:31 6180 [Note] Plugin 'FEDERATED' is disabled.2014-04-22 19:16:31 6180 [Note] InnoDB: Using atomics to ref count buffer pool pages2014-04-22 19:16:31 6180 [Note] InnoDB: The InnoDB memory heap is disabled2014-04-22 19:16:31 6180 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions2014-04-22 19:16:31 6180 [Note] InnoDB: Compressed tables use zlib 1.2.32014-04-22 19:16:31 6180 [Note] InnoDB: Not using CPU crc32 instructions2014-04-22 19:16:31 6180 [Note] InnoDB: Initializing buffer pool, size = 128.0M2014-04-22 19:16:31 6180 [Note] InnoDB: Completed initialization of buffer pool2014-04-22 19:16:32 6180 [Note] InnoDB: Highest supported file format is Barracuda.2014-04-22 19:16:32 6180 [Note] InnoDB: 128 rollback segment(s) are active.2014-04-22 19:16:32 6180 [Note] InnoDB: Waiting for purge to start2014-04-22 19:16:32 6180 [Note] InnoDB: 5.6.17 started; log sequence number 16259872014-04-22 19:16:32 6180 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8f19129f-ca0f-11e3-a876-003018a05bef.2014-04-22 19:16:32 6180 [Note] Server hostname (bind-address): '*'; port: 33062014-04-22 19:16:32 6180 [Note] IPv6 is available.2014-04-22 19:16:32 6180 [Note] - '::' resolves to '::';2014-04-22 19:16:32 6180 [Note] Server socket created on IP: '::'.2014-04-22 19:16:32 6180 [Note] Event Scheduler: Loaded 0 events2014-04-22 19:16:32 6180 [Note] mysqld.exe: ready for connections.Version: '5.6.17' socket: '' port: 3306 MySQL Community Server (GPL)
证明mysql服务已启动
6. 设置登陆mysql root帐号的的密码
在mysql/bin 目录下打开新的命令行,输入mysql 回车
D:/work/mysql-5.6.17-winx64/bin>mysqlWelcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 1Server version: 5.6.17 MySQL Community Server (GPL)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>
看到上面类似内容说明登陆成功,此时的root帐号是没有密码的,而我也没打算要密码
想要设置可使用命令
直接运行命令行窗口输入下面的
mysqladmin -u root password
你的密码
这样就Ok了,
7. 安装mysql服务
在bin目录下执行命令
mysqld.exe --install MySQL5.6.17 --defaults-file="D:/work/mysql-5.6.17-winx64/my.ini"
结果如下.
D:/work/mysql-5.6.17-winx64/bin>mysqld.exe --install MySQL5.6.17 --defaults-file="D:/work/mysql-5.6.17-winx64/my.ini"Service successfully installed.
8.启动服务
net start MySQL5.6.17
D:/work/mysql-5.6.17-winx64/bin>net start MySQL5.6.17MySQL5.6.17 服务正在启动 .MySQL5.6.17 服务已经启动成功。
注:若启动不成功修改注册表开始->运行->regedit
找HKEY_LOCAL_MECHINE---SYSTEM ---ControlSet001或ControlSet002中找Services,
再找MySQL项,修改 ImagePath值改为:"D:/work/mysql-5.6.17-winx64/bin/mysqld" --defaults-file="D:/work/mysql-5.6.17-winx64/my.ini" MySQL
最后为了方便添加环境变量.
MYSQL=D:/work/mysql-5.6.17-winx64
Path=%MYSQL%/bin;Path...
测试:
C:/Windows/System32>SET PATH=%MYSQL%/bin;%PATH%C:/Windows/System32>echo PATHPATHC:/Windows/System32>echo %PATH%D:/work/mysql-5.6.17-winx64/bin;D:/Program Files/java/jdk1.7.0_15/bin;D:/Program Files/java/jdk1.7.0_15/jre/bin;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;C:/Windows/System32/WindowsPowerShell/v1.0/C:/Windows/System32>mysqlWelcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 2Server version: 5.6.17 MySQL Community Server (GPL)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>
到此结束.

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











이 기사는 Docker에서 MySQL 메모리 사용을 최적화합니다. 모니터링 기술 (Docker Stats, Performance Schema, 외부 도구) 및 구성 전략에 대해 설명합니다. 여기에는 Docker 메모리 제한, 스와핑 및 CGroups와 함께 포함됩니다

이 기사에서는 MySQL의 "공유 라이브러리를 열 수 없음"오류를 다룹니다. 이 문제는 MySQL이 필요한 공유 라이브러리 (.so/.dll 파일)를 찾을 수 없음에서 비롯됩니다. 솔루션은 시스템 패키지 M을 통한 라이브러리 설치 확인과 관련이 있습니다.

이 기사는 MySQL의 Alter Table 문을 사용하여 열 추가/드롭 테이블/열 변경 및 열 데이터 유형 변경을 포함하여 테이블을 수정하는 것에 대해 설명합니다.

이 기사는 Linux에 MySQL을 직접 설치하는 것과 Phpmyadmin이없는 Podman 컨테이너 사용을 비교합니다. 각 방법에 대한 설치 단계에 대해 자세히 설명하면서 Podman의 격리, 이식성 및 재현성의 장점을 강조하지만 또한

이 기사는 자체 포함 된 서버리스 관계형 데이터베이스 인 SQLITE에 대한 포괄적 인 개요를 제공합니다. SQLITE의 장점 (단순성, 이식성, 사용 용이성) 및 단점 (동시성 제한, 확장 성 문제)에 대해 자세히 설명합니다. 기음

이 안내서는 Homebrew를 사용하여 MacOS에 여러 MySQL 버전을 설치하고 관리하는 것을 보여줍니다. 홈 브루를 사용하여 설치를 분리하여 갈등을 방지하는 것을 강조합니다. 이 기사에는 설치, 서비스 시작/정지 서비스 및 Best Pra에 대해 자세히 설명합니다

기사는 인증서 생성 및 확인을 포함하여 MySQL에 대한 SSL/TLS 암호화 구성에 대해 설명합니다. 주요 문제는 자체 서명 인증서의 보안 영향을 사용하는 것입니다. [문자 수 : 159]

기사는 MySQL Workbench 및 Phpmyadmin과 같은 인기있는 MySQL GUI 도구에 대해 논의하여 초보자 및 고급 사용자를위한 기능과 적합성을 비교합니다. [159 자].
