当前位置:网站首页>MySQL installation tutorial

MySQL installation tutorial

2022-06-25 02:58:00 Bugxiu_ fu

Today, I'd like to share some mysql Database installation , I hope that helps ( This database is generally used for small 、 Chinese Enterprises )


1、 Why do we use MySql?

1、mysql Performance is remarkable , Stable service , There are very few abnormal downtime .

2、mysql Open source and no copyright restrictions , Autonomy and low cost of use .

3、mysql Has a long history , The community and users are very active , Have a problem , You can ask for help .

4、mysql The software is small , Easy to install and use , And easy to maintain , Low installation and maintenance costs .

5、mysql Brand word of mouth effect , Make the enterprise use it directly without any consideration .

6、mysql Support multiple operating systems , Offer a variety of API Interface , Support multiple development languages .

2、MySql Installation steps

1、 Official website :MySQL :: MySQL Downloadsicon-default.png?t=M5H6https://www.mysql.com/cn/downloads/

2、 After downloading and decompressing , Open the command prompt as an administrator and execute the following code :

Switch to MySql Of bin Catalog         cd E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\bin

3. newly build my.ini   Put it in E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\ Under the folder

The contents of the document are as follows  

[mysql]
#  Set up mysql Client default character set 
default-character-set=utf8 

[mysqld]
# Set up 3306 port 
port = 3306
#  Set up mysql Installation directory 
basedir=E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64
#  Set up mysql Database data storage directory 
datadir=E:\mysql-5.7.23-winx64\mysql-5.7.23-winx64\\data
#  Maximum connections allowed 
max_connections=200
#  The character set used by the server defaults to 8 Bit coded latin1 Character set 
character-set-server=utf8
#  The default storage engine that will be used when creating a new table 
default-storage-engine=INNODB

 4、 install mysql, Execute code mysqld -install

  Xiaobian is here because I have already installed , So the prompt here already exists

5、 initialization , Execute code :mysqld --initialize-insecure --user=mysql     According to just my.ini File to initialize , Then it will produce a data Folder


 

After successful initialization, see the following figure  

 

6. start-up MySql service , Execute code net start mysql

7、 Set the password 、mysqladmin -u root -p password New password  

8、 Connect to database ,mysql -uroot -p 

 9、 Verify that you are logged into the database ,show tables;

原网站

版权声明
本文为[Bugxiu_ fu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206242356226949.html