本文實例為大家分享了mysql 5.7.13 winx64安裝配置方法圖文教程,供大家參考,具體內(nèi)容如下
下載
地址:http://dev.mysql.com/downloads/file/?id=463242
安裝
1、解壓下載好的mysql-5.7.13-winx64.zip到你需要安轉的目錄(eg:D:\mysql);
2、配置解壓目錄下的my_default.ini中命名為my.ini
作相關的配置如下:
# These are commonly set, remove the # and set as required.
basedir = D:\mysql5.7(mysql安裝目錄)
datadir = D:\mysql5.7\data(mysq中數(shù)據(jù)的保存目錄,自己定)
port = 3306(mysq的端口號)
# server_id = .....
3、添加環(huán)境變量
將D:\mysql5.7\bin添加到環(huán)境變量之中;
eg:......;D:\mysql5.7\bin
4、初始化
進入MySQL的bin文件夾
mysqld –install
mysqld –initialize –console (有一個 root@localhost: 后面有一連串的字母數(shù)字符號, 這是 MySQL 為你自動生成的隨機密碼,一定要記下來, 一會我們登陸 MySQL 數(shù)據(jù)庫的時候要用)。
PS:使用-initialize生成隨機密碼,使用-initialize-insecure生成空密碼,初始化后data文件夾會自動生成,不用自己新建哦。
5、啟動mysql
net start mysql
6、進入msyql并設置密碼
D:\mysql5.7\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.13 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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> set password=password('你自己的密碼');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql>
連接到遠程的mysql(兩臺win7局域網(wǎng)之間的連接mysql)
連接中的錯誤:
1、錯誤描述:設置root的遠程權限時:ERROR 1062 (23000): Duplicate entry ‘%-root' for key ‘PRIMARY'(最好不用這個,使用使用下面的的方法授權)。
解決辦法:已經(jīng)設置成功了。
2、mysql中的授權:
mysql> GRANT ALL PRIVILEGES ON . TO ‘root'@'%' IDENTIFIED BY ‘密碼' WITH GRANT OPTION;
mysql> flush privileges;
3、關閉防火墻(同時注意作為mysql載體的win7的ip地址的正確性局域網(wǎng)ip)
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
您可能感興趣的文章:- win10 mysql 5.6.35 winx64免安裝版配置教程
- mysql 5.7.10 winx64安裝配置方法圖文教程(win10)
- Mysql 5.7.17 winx64免安裝版,win10環(huán)境下安裝配置圖文教程
- 64位 win10系統(tǒng)安裝綠色版mysql-5.7.16-winx64的教程
- Win10安裝MySQL5.7.18winX64 啟動服務器失敗并且沒有錯誤提示