day 36 content:
mysql official website www.mysql.org
Database installed on day36 03
mysql default port 3306
Database composition:
Table: Fields
Database classification:
Relational type: Relational type has table structure The table needs to specify the header (field), and the stored data must be accessed according to the type or constraint of the field
Non-relational: access data is in the form of key:value # (crawlers generally use non-relational databases)
What relational databases are there?
mysql oracle sqlserver
Non-relational database?
mongodb redis memcache
mysql installation:
1. After decompressing the file, find the MySQL bin and its startup file below. Copy the path of the bin and add it to the environment variable of the server.
start up:
mysql client connection:
mysql &-h(#Specify the server address) &127.0.0.1 &-P (#Specify the mysql port number, the default is 3306)-uroot(Specify the user name root)-p(#Specify the password)
#Order doesn't matter
Local login server abbreviation:
Make mysql a service:
#Check which system services are available on Windows: during operation, tap services.msc
Set the service to start automatically (start automatically at boot)
Order:
show databases; (show all databases)
mysql administrator password settings:
1. First create a password for the database: #When the database has no password
mysqladmin&-uroot&-p&password&‘123456’
2. Modify the database password:
mysqladmin -uroot -p123456 password "" #If the string is empty, there is no password
---------------------------------------------------------------------------------------------------------------
mysql administrator password cracking 04 video
1. Close the mysql server
2. Skip the mysql server authorization table: #Let mysql not load the authorization file
mysqld --skip-grant-tables #Do not close the window
3. Open another client:
mysql -uroot -p #At this time, mysql can connect by default to anyone without authorization password
4. Modify the database password
update mysql.user set password=password(‘123’) where user=‘root’ and host=‘localhost’;
#The first password is a field, and the second is md5 encryption
After the modification is successful, enter mysql to refresh the permissions:
flush privileges; #Refresh privileges
Start cmd as administrator to kill the mysql server
tasklist | findstr mysqld #View mysql process
taskkill /F /PID xxx (xxx Conseole number)
ok
----------------------------------------------------------------------------------------
infomation_schema comes with (stored in memory) some permission information
kill mysql in windows