当前位置:网站首页>MySql安裝教程
MySql安裝教程
2022-06-25 02:58:00 【Bugxiu_fu】
今天小編給大家分享一些mysql數據庫的安裝,希望能幫到大家(此數據庫一般用於小、中企業)
1、為什麼我們要使用MySql?
1、mysql性能卓越,服務穩定,很少出現异常宕機。
2、mysql開放源代碼且無版權制約,自主性及使用成本低。
3、mysql曆史悠久,社區及用戶非常活躍,遇到問題,可以尋求幫助。
4、mysql軟件體積小,安裝使用簡單,並且易於維護,安裝及維護成本低。
5、mysql品牌口碑效應,使得企業無需考慮就直接用之。
6、mysql支持多種操作系統,提供多種API接口,支持多種開發語言。
2、MySql安裝步驟
1、官網:MySQL :: MySQL Downloads
https://www.mysql.com/cn/downloads/
2、下載解壓並解壓後,用管理員身份打開命令提提示符執行如下代碼:
先切換到MySql的bin目錄 cd E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\bin
3.新建my.ini 放到E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\文件夾下
文件內容如下
[mysql] # 設置mysql客戶端默認字符集 default-character-set=utf8 [mysqld] #設置3306端口 port = 3306 # 設置mysql的安裝目錄 basedir=E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64 # 設置mysql數據庫的數據的存放目錄 datadir=E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\\data # 允許最大連接數 max_connections=200 # 服務端使用的字符集默認為8比特編碼的latin1字符集 character-set-server=utf8 # 創建新錶時將使用的默認存儲引擎 default-storage-engine=INNODB
4、安裝mysql,執行代碼mysqld -install
小編這裏是因為我已經安裝好了,所以這裏提示已存在
5、初始化,執行代碼:mysqld --initialize-insecure --user=mysql 根據剛剛my.ini文件去初始化,然後會產生一個data文件夾
初始化成功後如下圖
6.啟動MySql服務,執行代碼net start mysql
7、設置密碼、mysqladmin -u root -p password 新密碼
8、連接數據庫,mysql -uroot -p
9、驗證一下是否登錄數據庫,show tables;
边栏推荐
猜你喜欢
使用XXL-JOB自定义任务并调度
AOSP ~ WIFI架构总览
支付宝被风控7天怎么办?付解决方案
AI服装生成,帮你完成服装设计的最后一步
MySQL learning notes -- addition, deletion, modification and query on a single table
Unity archive system - file in JSON format
yarn : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本
好用的字典-defaultdict
分布式事务解决方案和代码落地
How transformers Roberta adds tokens
随机推荐
Is it safe to open an account in the way of winning 100% of the new bonds
Expressing the transformation of two coordinate systems with vectors
After reciting the eight part essay, I won the hemp in June
CMakeLists中的add_definitions()函数
It is said that Yijia will soon update the product line of TWS earplugs, smart watches and bracelets
E - Average and Median(二分)
C # realizes crystal report binding data and printing
好用的字典-defaultdict
Go synchronization waiting group
李宏毅《机器学习》丨6. Convolutional Neural Network(卷积神经网络)
UnityShader入门精要——表面着色器
Can the polardb database be connected to the data source through MySQL
分布式事务解决方案和代码落地
Array - fast and slow pointer in one breath
打新债100%中签的方法 开户是安全的吗
自动化测试
Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (4) -- modify the scanip of Oracle11g RAC cluster
电脑端微信用户图片DAT格式解码为图片(TK版)
DSPACE set zebra crossings and road arrows
20年ICPC澳门站L - Random Permutation