mysql数据库的初学操作:增删查改

 



Sql

https://dev.mysql.com/downloads/mysql/

 

 

mysqlmy.ini

 

[mysqld]

 

# basedirMySQL

basedir = D:\mysql\mysql-8.0.20-winx64

# datadirMySQL

datadir = D:\mysql\mysql-8.0.20-winx64\data

# port3306

port = 3306

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

 

 

 

cmd

 

 

bin

 

mysqld --initialize --console

 

西

 

使mysqld --initialize-insecure

便

 

mysqld install


 

 

MySQL

 

 

mysql

net stop mysqlMySQL

 

 

Mysql

MySQL

 

mysql -u root -p

-u : ;

-p : 使, , 

 

exit退

 

 

MySQL

mysqld --console

 

mysqladmin -uroot shutdown

 

 

bin

 

 

 

 

 

 

mysql -u root -p

 

CREATE DATABASE ;

yzpnb

 

 

drop database  ;

 

use 名;

 

 

 

 

 

 

mysql

 

MySQL/()

 

 

 

 

 

 

 

CREATE TABLE  (column_name column_type);

CREATE TABLE IF NOT EXISTS `yzp666`(
  `id` INT UNSIGNED AUTO_INCREMENT,
  `title` VARCHAR(100) NOT NULL,

  PRIMARY KEY ( `id` )

)ENGINE=InnoDB DEFAULT CHARSET=utf8;

yzp666idtitle

AUTO_INCREMENT

titleVARCHAR100

PRIMARY KEY

ENGINE

CHARSET   utf-8.

 


使show tables 

yzpnbyzp666

 

 

yzpnbdesc   

 

 

DROP TABLE  ;

show tables  

 

 

INSERT INTO  ( field1, field2,...fieldN )

                      VALUES                       

                        (value1, value2,...valueN );

runoob_tbl

insert into 

               123

                  Value

               12 3

 

select * from      

select * from 称;

 

*

 

where

 

使wherePHP

Wherepythonif

 

 

 

posted @ 2020-06-13 10:37  Zeker62  阅读(62)  评论(0编辑  收藏  举报