MySQL Learning notes-day 1th

Source: Internet
Author: User

1, like the account on the page, pictures, articles are existing database inside
2, Oracle, DB2, SQL Server and so on multi-clock database
PHP choose to use MySQL Php+mysql Gold Partner
PHP and MySQL are open source, free and practical, good configuration.
MySQL medium fits, but not Oracle powerful.
3. mysql Architecture: c/S Client/server
Open on server side, client side operation
MySQL DBMS (DB stands for Database m for Management S representative system)
Client Operations server-side---Database-data table-(row (record), Row (field))
4, the programmer to learn the MySQL
1. Design a table for your project
2, using SQL statements (SQL Programming-connection, data additions and deletions)
You can use the tool to complete.
5, MySQL installation, and PHP integration
Directory structure: My.ini configuration file: Modify port, character set, etc.

Boot server: (1) with boot entry (2) Computer Management/Services/find MySQL service one can start
(3) Start with the cmd command: NET Strat/stop/restrat mysql startup service
The Linux environment is the service Mysqld strat
Configure environment variables: Computer properties are paired with environment variable path. The corresponding directory is placed in the variable value of path.
The paths are separated by semicolons. Find the command on the inside path first under the cmd command line
6. Statement operation of Database SQL
SQL (structured Query language)
DDL Creation Table
DML data manipulation and additions and modifications
DQL data Query
DCL Data Control statements (administrative permissions, data changes)
1. Execute SQL statement, link to database server
cmd command: mysql-h (address) IP address/natively: localhost-u (specified user) root-p123456 (password)
Tip Mysql> Enter exit exit
To leave an administrator user
Ddl:
Create Database Liangcha (library name)
Drop Database Liangcha (delete library) (equivalent to new delete folder)
Create database if not exists Liangcha
CREATE TABLE Liangcha User (id int,name char<30>);
Select a library as the default database for easy operation
Use Liangcha;
Show database/table; (view)
Dml:
Insert into User (Id,name) values<1, ' Zhang San ' >
Updata user set name= ' Lili ' where id= ' 1 ' (modified to change the name of ID 1 to Lili)
Delete from user where id= ' 1 ' (delete) where= operation condition
DQL:
SELECT * from user (query table)
DCL:
\s Look at the state
Show databases See all libraries
Show tables See all Tables
DESC View Table Structure
The variables in the show varlable configuration file



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.