mysql学习笔记--第1天_MySQL
1、像网页上的账户、图片、文章都是存在数据库里面
2、Oracle 、DB2 、SQL server等等多钟数据库
PHP中选择使用mysql PHP+mysql黄金搭档
PHP和mysql都是开源的,免费实用,配置性好。
mysql中小型适合,但没有Oracle强大。
3、mysql的架构:C/S client/server
在server端开启,client端操作
mysql DBMS(DB代表数据库 M代表管理 S代表系统)
客户端操作 服务器端---数据库--数据表--(行(记录),行(字段))
4、程序员要学的mysql
1、为你的项目设计表
2、使用sql语句(sql编程--连接,数据增删改查)
可以使用工具完成。
5、mysql安装,和php整合
目录结构:my.ini配置文件 :自己修改端口、字符集等等
启动服务器:(1)自带启动入口(2)计算机管理/服务/找到mysql服务一项可以启动
(3)用cmd命令启动:net strat/stop/restrat mysql 启动服务
linux环境下 是service mysqld strat
配置环境变量:计算机属性搭配环境变量path。吧对应的目录放在path的变量值里面
路径之间用分号隔开。在cmd命令行下先在里面的路径查找该命令
6、数据库sql的语句操作
SQL (structured Query language)
DDL创建表
DML数据操作 增删改查
DQL数据查询
DCL数据控制语句(管理权限,数据更改)
1、执行sql语句,链接到数据库服务器
cmd命令:mysql -h(地址)IP地址/本机:localhost -u(指定用户) root -p123456(密码)
提示mysql>进入 exit退出
要留一个管理员用户
DDL:
create database liangcha(库名称)
drop database liangcha (删除库)(相当于新建删除文件夹)
create database if not exists liangcha
create table liangcha user(id int,name char);
选择一个库作为默认数据库,方便操作
use liangcha;
show database/table;(查看)
DML:
insert into user(id,name) values
updata user set name='lili' where id='1' (修改把id为1的那个名字修改为lili)
delete from user where id=‘1’ (删除) where=操作的条件
DQL:
select * from user(查询表)
DCL:
/s看状态
show databases 看所有库
show tables 看所有表
desc 看表结构
show varlable 配置文件中的变量

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
