MySQL: Install MySQL and Start Use

MySQL: Install MySQL and Start Use

Download MySQL

If you need MySQL8.1 or other versions, you can click here:
MySQL Community Downloads

Just click “Download” and execute the “.msi” file, and MySQL will installed on your PC.

download-mysql

Configure MySQL Server

First, we should configure the MySQL Server.

  1. Set the username and password.
  2. Assign the port number to the SQL Server. (Default: 3306)

mysql-configure

Now, you can access the MySQL Server by localhost or 127.0.0.1.

Start Use SQL

Some tools can help us to operational MySQL Database:

  1. MySQL Command Line Client
  2. CMD or PowerShell
  3. MySQL Shell
  4. Some Programming Language

Here we use the MySQL Command Line Client to demonstrate.

Connect the Server

MySQL Command Line Client defaults connecting the MySQL Server so that you can enter the password directly.

login-mysql-server-before

login-mysql-server-after

If you use the CMD or PowerShell, you should execute the command first:mysql -u [username] -p.
The default username is root, so usually you can execute mysql -u root -p to the next step.

use-powershell-login-before

use-powershell-login-after

But maybe you will meet some wrongs like “mysql不是内部或外部命令”. That’s because the system environment variables are not configured correctly. You can solve the problem in the following steps:

  1. Open the Windows menu and search “环境变量”.
  2. Find the “环境变量” in a new window.
  3. In the “系统变量” section, double-click the ‘Path’.
  4. Add your MySQL install path to here.
  5. Confirm your edit.

search-environment-variable

find-environment-variable

add-sql-path

Try to Query

Now you can use the database normally!

try-to-use

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇