mysql 5.6.26 winx64裝置設置裝備擺設圖文教程(一)。本站提示廣大學習愛好者:(mysql 5.6.26 winx64裝置設置裝備擺設圖文教程(一))文章只能為提供參考,不一定能成為您想要的結果。以下是mysql 5.6.26 winx64裝置設置裝備擺設圖文教程(一)正文
浏覽目次
• 下載MySQL免裝置版
• 設置裝備擺設MySQL數據庫
• MySQL情況變量
• 裝置MySQL數據庫
公司辦事器是Windows 開辟銜接的數據庫應用的是"MySQL"
此篇漫筆將引見在Windows上若何設置裝備擺設MySQL數據庫免裝置版
1、下載MySQL免裝置版
• 起首進入MySQL 官方網站 www.mysql.com -->Downloads(下載) --> Community(社區) --> MySQL Community Server(MySQL社區辦事器)-->選擇操作體系平台(Windows)
• 上面有三個可選的下載文件
† 第一個是MySQL Installer 5.6 for Windows,下載上去是一個.msi可履行裝置文件
† 前面兩個是解壓版(Zip版)分離是Windows (x86, 64-bit) ZIP Archive 和 Windows (x86, 32-bit), ZIP Archive
• 筆者選擇的是 mysql-5.6.26-winx64.zip ,由於筆者的辦事器版本是64位操作體系
2、設置裝備擺設MySQL數據庫
• 將下載的 mysql-5.6.26-winx64.zip 解壓自界說目次,這裡筆者將把這個緊縮包解壓至 D:\mysql-5_x64 目次;
• 翻開這個目次,發明外面的文件夾和文件跟一個裝置好後的MySQL根本沒有差別
• 修正MySQL設置裝備擺設文件,在mysql-5_x64目次下有一個my-default.ini,可以算作模板來應用,外面的內容不是許多!可以本身創立一個 my.ini作為MySQL設置裝備擺設文件,翻開my.ini
[client]
port=3306
#客戶端字符類型,與辦事端分歧就行,建議utf8
default-character-set=utf8
[mysqld]
#綁定IPv4和3306端口
bind-address = 0.0.0.0
port = 3306
#辦事端字符類型,建議utf8
character_set_server=utf8
# 設置mysql的裝置目次
basedir=D:/mysql-5_x64
# 設置mysql數據庫的數據的寄存目次
datadir=D:/mysql-5_x64/data
# 許可最年夜銜接數
max_connections=201
• 如許一個根本的MySQL情況所須要的參數就夠了
3、MySQL情況變量
• 右擊這台電腦-->屬性-->高等-->情況變量-->"用戶變量"新建變量MYSQL_HOME 值D:\mysql-5_x64 ,"體系變量"找到變量path 編纂 在前面加上 ;%MYSQL_HOME%\bin
4、裝置MySQL數據庫
• 運轉cmd (Win8 、Win10以治理員運轉cmd)-->進入D:\mysql-5_x64\bin目次
Microsoft Windows [版本 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Windows\system32>D:
D:\>cd mysql-5_x64
D:\mysql-5_x64>cd bin
D:\mysql-5_x64\bin>
• 履行mysqld -install 裝置MySQL
D:\mysql-5_x64\bin>mysqld -install
Service successfully installed
• 履行net start mysql啟動MySQL
D:\mysql-5_x64\bin>net start mysql
D:\mysql-5_x64\bin>net start mysql
MySQL 辦事正在啟動 .
MySQL 辦事曾經啟動勝利
啟動MySQL辦事:net start mysql
停滯MySQL辦事:net stop mysql
刪除MySQL辦事:sc delete mysql
• 修正Mysql暗碼
D:\mysql-5_x64\bin>mysql -u root -p //應用root登入mysql
Enter password: //暗碼空,回車便可
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> show databases; //顯示一切數據庫 +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.00 sec)
• 進入'mysql'數據、刪除空用戶
mysql> use mysql; Database changed mysql> delete from user where user=''; Query OK, 1 row affected (0.00 sec)
• 更新暗碼偏重新刷權限表到內存(也能夠用mysqladmin對象來設置暗碼)
mysql> update User set Password=PASSWORD('123456') where User='root'; Query OK, 4 rows affected (0.00 sec) Rows matched: 4 Changed: 4 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
• 測驗考試上岸
D:\mysql-5_x64\bin>mysql -u root -p //用root用戶登入數據庫 Enter password: ****** //輸出更新後的暗碼 123456 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.6.26 MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
• 開啟長途銜接(賜與全體權限,許可 192.168.1.x 網段都可以銜接)
mysql> grant all privileges on *.* to 'root'@'192.168.1.%' identified by 'root' with grant option; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> select host,user,password from user; +-------------+------+-------------------------------------------+ | host | user | password | +-------------+------+-------------------------------------------+ | 192.168.1.% | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | +-------------+------+-------------------------------------------+ 4 rows in set (0.00 sec)
出色專題分享:mysql分歧版本裝置教程 mysql5.7各版本裝置教程
以上就是本文的全體內容,願望對年夜家的進修有所贊助,也願望年夜家多多支撐。