Yuav Tsim Cov Mysql Database Li Cas

Cov txheej txheem:

Yuav Tsim Cov Mysql Database Li Cas
Yuav Tsim Cov Mysql Database Li Cas

Video: Yuav Tsim Cov Mysql Database Li Cas

Video: Yuav Tsim Cov Mysql Database Li Cas
Video: MySQL Tutorial #1 - How to Create a MySQL Database, User and Grant Permissions 2024, Tej zaum
Anonim

MySQL DBMS yog ib qhov nrov tshaj plaws nyob hauv lub ntiaj teb. Nws yog siv nyob rau hauv ob qho tib si me me thiab loj qhov loj thau cov phiaj xwm. Yog li no, kev paub nrog mysql yuav tsis muaj kev coj ua rau txhua tus kws tshaj lij IT. Koj tuaj yeem kawm paub ua haujlwm nrog mysql los ntawm kev nyeem cov ntaub ntawv thiab kev xyaum. Tab sis qhov no yuav tsa ntau cov lus nug. Thiab ib qho ntawm thawj yuav yog cov lus nug ntawm yuav ua li cas los tsim mysql database thiab los ntawm dab tsi txhais tau tias nws yog qhov zoo tshaj los ua nws.

Yuav tsim cov mysql database li cas
Yuav tsim cov mysql database li cas

Tsim nyog

Cov ntaub ntawv rau kev nkag mus rau mysql server. Mysql console neeg

Cov Lus Qhia

Kauj ruam 1

Txuas rau mysql database server. Ua li no, pib mysql console tus thov kev pabcuam nrog cov nqi tsim nyog rau -h, -u, thiab --password tsis. -H parameter qhia meej cov hostname ntawm mysql server. -U parameter qhia meej txog lub npe siv nyob hauv uas tus neeg siv mysql yuav tsum nkag mus rau tus neeg rau zaub mov, thiab - - dhau parameter qhia meej txog tus neeg siv cov password. Tus neeg rau zaub mov hostname tuaj yeem yog tus IP lossis npe cim. Mysql cov neeg thov kab pib rau kev sib txuas rau lub chaw khaws ntaub ntawv khiav ntawm lub tshuab hauv zos nrog cov npe test_user thiab password test_user_pwd yuav zoo li qhov no: "mysql -h localhost -u test_user --password = test_user_pwd". Yog hais tias cov kev pab cuam cov neeg muaj ntse tau txuas rau lub neeg rau zaub mov, ib tug coj tam sim yuav tshwm nyob rau hauv lub screen.

Kauj ruam 2

Sau cov cim uas twb muaj lawm uas tuaj yeem siv los tsim cov databases. Nkag mus rau lo lus txib "QHIA PHEEJ RAUG DAWB;" thiab nias ENTER yuam.

Kauj ruam 3

Sau cov teev uas twb muaj lawm. Nkag mus rau lo lus txib "QHIA TXAWV LAWM;" thiab nias ENTER yuam.

Kauj ruam 4

Xaiv lub npe thiab cim qauv rau cov ntaub ntawv tsim yuav tsim. Lub npe yuav tsum tsis txhob nyob hauv cov npe ntawm cov npe uas twb muaj lawm. Lub cim teeb tsa yuav tsum tau nruab rau ntawm tus neeg rau zaub mov. Nws tuaj yeem xaiv los ntawm cov npe uas tso tawm los ntawm cov lus txib "SHOW CHARACTER SET;"

Kauj ruam 5

Tsim mysql database. Txhawm rau ua qhov no, nkag mus rau ib qho lus txib ntawm daim foos "Tsim DATABASE` database_name` CHARACTER SET character_set COLLATE comparison_rules;". Qhia lub npe database uas koj xaiv rau lub database_name parameter. Qhov "teeb tsa" ntawm kab hluav taws xob yuav tsum yog lub cim siv tau lub npe. Rau qhov "collation_rules" parameter, qhia kom meej cov nqi ntawm "Default collation" teb los ntawm daim ntawv teev cov cim teeb meem ua ke nrog xaiv cov teeb. Yog tias koj tsis paub meej tias lub cim twg tau tsim los siv rau koj lub chaw khaws ntaub ntawv, xaiv utf8. Qhov no yog txheej txheem universal uas txhawb nqa yuav luag tag nrho cov cim uas twb muaj lawm yuav luag txhua hom lus hauv ntiaj teb. Tom qab ua tiav kev tsim cov ntaub ntawv, ib cov lus sib cav yuav tshwm.

Pom zoo: