MySQL ??
MySQL ????????????????,??????????????????????????? Markdown ???? MySQL ????
??
??
MySQL ????????????????,? Oracle ???????? SQL ????????,????????,? Windows?Linux ? macOS?
?????
??
- ?? MySQL ??????:https://dev.mysql.com/downloads/mysql/
- ????????????????
- ??????????????
??
?? MySQL ???? my.cnf
(Windows ??? my.ini
),??????:
[mysqld] port = 3306 bind-address = 127.0.0.1 character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci
??????? MySQL ???
????
???
???????????,?????
?
?????????????,???????
???
????????????,??????????
??
????????????????????
????????
?????
CREATE DATABASE ?????;
?????
USE ?????;
?????
DROP DATABASE ?????;
??????
???
CREATE TABLE ??? ( ??1 ????1, ??2 ????2, ... );
?????
ALTER TABLE ??? ADD ?? ????, DROP ??, MODIFY ?? ????;
???
DROP TABLE ???;
??????????
????
INSERT INTO ??? (??1, ??2, ...) VALUES (?1, ?2, ...);
????
UPDATE ??? SET ??1 = ?1, ??2 = ?2, ... WHERE ??;
????
DELETE FROM ??? WHERE ??;
????
?????
SELECT * FROM ???;
?????
SELECT ??1, ??2, ... FROM ???;
?????
SELECT * FROM ??? WHERE ??;
?????
SELECT * FROM ??? ORDER BY ?? ASC|DESC GROUP BY ??;
?????
????
CREATE INDEX ???? ON ??? (??);
????
DROP INDEX ???? ON ???;
?????
????
mysqldump -u ??? -p ????? > ?????.sql
????
mysql -u ??? -p ????? < ?????.sql
?????
????
CREATE USER '???'@'IP??' IDENTIFIED BY '??'; GRANT ???? TO '???'@'IP??'; FLUSH PRIVILEGES;
????
REVOKE ???? FROM '???'@'IP??';
??
???????? MySQL ????????????????????????????????????????????????????????????????!