MySQL study notes 01 [database concept, MySQL installation and use]

  • MySQL Document-Dark Horse Programmer (Tencent Weiyun): https://share.weiyun.com/RaCdIwas
  • 1-MySQL foundation.pdf, 2-MySQL constraints and design.pdf, 3-MySQL multi-table query and transaction operation.pdf
  1. MySQL study notes 01 [database concept, MySQL installation and use] [day01]
  2. MySQL study notes 02 [SQL basic concepts and general grammar, database CRUD operations] [day01]
  3. MySQL study notes 03 [CRUD operations of database tables, basic operations recorded in database tables, client-side graphical interface tool SQLyog] [day01]

  4. MySQL study notes 04 [database query operations, table constraints] [day01, day02]

  5. MySQL study notes 05 [multi-table operation, three paradigms, database backup and restore] [day02]

  6. MySQL study notes 06 [multi-table query, sub-query, multi-table query exercises] [day03]

  7. MySQL study notes 07 [transaction, user management and authority management] [day03]

table of Contents

01 Database Concept

Today's content

Basic concepts of database

02 MySQL installation and use

MySQL database software

MySQL database installation

Uninstallation of MySQL database

MySQL service (startup and shutdown)

Login local/remote MySQL

MySQL installation directory

MySQL data directory


01 Database Concept

Today's content

  1. Basic concepts of database

  2. MySQL database software

    1. installation

    2. Uninstall

    3. Configuration

  3. SQL

Basic concepts of database

  • 1. English word of database: DataBase Abbreviation: DB
  • 2. What database?
    • Warehouse for storing and managing data.
  • 3. Features of the database:
    • 1. Persistent storage of data. In fact, the database is a file system
    • 2. Convenient to store and manage data
    • 3. Use a unified way to operate the database-SQL
  • 4. Common database software
    • * See "MySQL Basics.pdf"

02 MySQL installation and use

MySQL database software

  • 1. Installation
    • * See "MySQL Basics.pdf"
  • 2. Uninstall
    • 1. Go to the mysql installation directory and find the my.ini file
      • * 复制 datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
    • 2. Uninstall MySQL
    • 3. Delete the MySQL folder in the C:/ProgramData directory.
  • 3. Configuration
    • ①* MySQL service start
      • 1. Manually.
      • 2. cmd--> services.msc to open the service window
      • 3. Use the administrator to open cmd
        • * net start mysql: start mysql service
        • * net stop mysql: close mysql service
    • ②* MySQL login
      • 1. mysql -uroot -p password
      • 2. mysql -hip -uroot -p connection target password
      • 3. mysql --host=ip --user=root --password=The password of the connection target
    • ③* MySQL exit
      • 1. exit
      • 2. quit
    • ④* MySQL directory structure
      • 1. MySQL installation directory: basedir="D:/develop/MySQL/"
        • * Configuration file my.ini
      • 2. MySQL data directory: datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
        • * Several concepts
          • * Database: Folder
          • * Table: File
          • * Data: Data

MySQL database installation

Install the MySQL server software. After installation, a MySQL service (application without interface) will be registered in the Windows service list.

  

  

  

  

Uninstallation of MySQL database

  

Data directory, data folder [(hidden folder) must be deleted, otherwise it may not be installed if you install it again!

Uninstall the MySQL database (MySQL 8) on the computer.

  

If the MySql folder under the "C:\ProgramData" folder cannot be deleted, Win+R->"services.msc", stop MySQL, and then delete the MySql folder under the "C:\ProgramData" folder.

MySQL service (startup and shutdown)

  

  

  

Login local/remote MySQL

  

MySQL installation directory

  1. bin directory: store binary executable files (mysql.exe: command to log in to the MySQL server).
  2. data directory: data directory, storing MySQL data files and log files.
  3. include directory: C language header information.
  4. lib directory: some jar packages and library files needed by MySQL.
  5. share directory: store some error messages of mysql.
  6. my.ini: mysql configuration file.

MySQL data directory

Guess you like

Origin blog.csdn.net/weixin_44949135/article/details/113510187