Learning Essentials
- Installation and setup of MySQL database
Download MySQL
MySQL official website: https://www.mysql.com/downloads/
Major versions:
Oracle MySQL Cloud Service (commercial)
MySQL Enterprise Edition (commercial)
MySQL Cluster CGE (commercial)
Download version: MySQL Community Edition (Gpl:general public License)
Unzip to the specified folder and rename to MySQL
Extract to: D:\mysql
Put the My.ini file in the MySQL directory
My.ini file contents, involving the configuration of the database:
[mysql]# set MySQL client default character set Default-character-set=utf8 [mysqld] #设置3306端口port = 3306# Set the installation directory for MySQL basedir=d:\mysql# Set the data storage directory for the MySQL database datadir=d:\mysql\data# the maximum number of connections allowed max_connections=200# The character set used by the service side defaults to the 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine that will be used when creating a new table Default-storage-engine=innodb
Enter the Mysql/bin directory in the CMD environment to install the MySQL service
Remarks: Uninstall service: mysqld--remove MySQL
Enter the console to confirm that the service is started
- Control Panel \ System and security \ Administrative Tools \ Services
- Right-click to start the MySQL service.
You can adjust the startup properties to manual.
Turn on remote access permissions
GRANT all privileges on * * to ' root ' @ '% ' identified by ' root123 ' with GRANT OPTION;
Log in to MySQL
User name: Root
Password: * * *
4. Create MySchool database, delete myschool database, view database showdatabases
- View the database structure
- To see if the MySchool database was created successfully
- Check if Delete succeeded
MYSQL-01 MySQL Database Installation Guide