本博文的主要內容有html
.數據庫的概述mysql
.mysql-5.7.11-winx64.zip 的下載sql
.mysql-5.7.11-winx64.zip 的安裝數據庫
.mysql-5.7.11-winx64.zip 的配置windows
.mysql-5.7.11-winx64.zip 的使用微信
推薦如下方式來安裝mysql機器學習
一、數據庫的概述工具
前言oop
想說的是,有mysql必定基礎的人員,學大數據裏的hive、hbase更是難得!post
二、mysql-5.7.11-winx64.zip 的下載
http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.11-winx64.zip
能夠從如下網址,找到全部的MySQL的歷史版本
https://downloads.mysql.com/archives/community/
三、mysql-5.7.11-winx64.zip 的安裝和配置
一、 解壓縮zip包
這裏想說的是,咱們都知道,關於軟件的安裝,有兩種,msi方式和壓縮包解壓安裝。
關於msi的安裝方式,我這裏便很少贅述了,見
http://jingyan.baidu.com/article/7e440953d6f0702fc1e2ef61.html
壓縮包解壓方式的安裝:
而後,在這一步有資料說,修改默認配置文件my-default.ini。這裏啊,我呢。通常爲了專業規範起見,將默認的my-default.ini修改命名爲my.ini(這一點,是模仿hadoop/spark)裏的配置文件設法。
二、 變成
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/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 = .....
# 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
三、作以下的修改
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/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 = D:\SoftWare\MySQL\mysql-5.7.11-winx64
datadir = D:\SoftWare\MySQL\mysql-5.7.11-winx64\Data
port = 3306
# 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
四、配置環境變量
新建,MYSQL_HOME,
在windows的path裏,添加以下
;%MYSQL_HOME\bin;(注意加分號)
五、將mysql註冊爲windows系統服務,即初始化mysql
具體操做是在命令行中執行如下命令(須要以管理員身份運行命令行):
如下命令是在dos命令行中進行的
須要切換到mysq安裝的bin目錄,
不然,會將服務目錄指定爲C:\Program Files\MySQL\MySQL Server 5.7\mysqld
這裏,順便,學些dos窗口裏的一些經常使用命令吧!
以管理員的身份進行運行,
C:\Users\Administrator>cd /d D:\
D:\>cd D:\SoftWare\MySQL\mysql-5.7.11-winx64
D:\SoftWare\MySQL\mysql-5.7.11-winx64>cd bin
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin>
六、本身新建好Data目錄
七、執行mysqld.exe --initialize 命令,
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin>mysqld --initialize
回車
八、執行 mysqld -install命令
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin > mysqld install
或者
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin >
mysqld install MySQL --defaults-file=
" D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin\my.ini"
或者
顯示Service successfully installed.表示初始化成功!
九、執行mysqld.exe -nt --skip-grant-tables
注意:窗口無反應
十、從新打開dos窗口,執行mysql -u root
十一、執行mysql -u root
mysql> use mysql
Database changed
mysql> update user set authtication_string=Password('rootroot') where user='root'
-> set password=Password('rootroot')
->
十二、在任務管理器中終止mysqld進程,
1三、開啓mysql服務。
D:\SoftWare\MySQL\mysql-5.7.11-winx64\bin> net start mysql
安裝完成。
五、mysql-5.7.11-winx64.zip 的使用
之後,每次,都是到bin
感謝以下的連接博主:
http://www.cnblogs.com/endv/p/5205435.html
總結:
對於windows裏安裝Mysql,會出現各類問題,在此,我也是在這基礎上,獲得了認識和提高!!!
問題:
解決辦法1:
mysqld –remove MySQL
【轉】終於知道爲何個人mysql老是卸載的不乾淨以及總是找不到my.ini文件
http://blog.sina.com.cn/s/blog_6fc5bfa90100qmr9.html
http://www.cnblogs.com/zlslch/p/5862100.html
推薦書籍:
同時,你們能夠關注個人我的博客:
http://www.cnblogs.com/zlslch/ 和 http://www.cnblogs.com/lchzls/
人生苦短,我願分享。本公衆號將秉持活到老學到老學習無休止的交流分享開源精神,匯聚於互聯網和我的學習工做的精華乾貨知識,一切來於互聯網,反饋回互聯網。
目前研究領域:大數據、機器學習、深度學習、人工智能、數據挖掘、數據分析。 語言涉及:Java、Scala、Python、Shell、Linux等 。同時還涉及日常所使用的手機、電腦和互聯網上的使用技巧、問題和實用軟件。 只要你一直關注和呆在羣裏,天天必須有收穫
以及對應本平臺的QQ羣:161156071(大數據躺過的坑)