Simple mysql database operations required in php. Simple mysql database operations required in php, phpmysql1. database connection 1.1 use the windows command line to connect to the database server. Several DOS commands are not used in php in the
I. Introduction of the Database
(1) database is the repository of data, data is not directly placed in the database, the database is placed in a table, the table is the data stored;
(2) History of the database
Embryonic stage-File system: Use disk
I. Introduction what is MySQL?
MySQL is a relational database management system developed by the Swedish MySQL AB company and is currently part of Oracle's product portfolio. MySQL is one of the most popular relational database management
1th. Database 1.1 Database Overviewl What is a databaseThe database is the warehouse that stores the data, its essence is a file system, the data is stored in the specific format, the user can add, modify, delete and query the data in the database.l
What is a database?A repository of data, essentially a file system that encapsulates algorithms and filesStorage mode of previous dataPhase 1: Collection array variablesCons: Data is stored in memory and cannot be persisted for data storagePhase
1. database creation syntax createdatabase database name on [primary] (data file parameter [, n] [file group parameter]) [LOGON] (log file parameter [, n]) note: [] indicates the optional part, and {} indicates that you need to create some database
MySQL Learning (2)-SQL statement creation, deletion, modification, and Chinese garbled characters
1. Database Operations
1. Create a database
Create database name;
Create an encoded: create database name character set encoding;
View the encoding:
The operation of this database is performed under the Linux virtual machine platform.1 starting and linking MySQL Service 1.1 server(1) View service statusSudo/etc/init.d/mysql stauts(2) Start the service sideSudo/etc/init.d/mysql start(3) Stop the
1. Introduction to the Database
Database classification
DDL (data definition Language): Definition Language for database objects: libraries, tables, columns, etc. CREATE, ALTER, DROP
DML (Data manipulation Language):
Log in to MySQL mysql-h hostname-u username-p passwordStart MySQL under MacAdded to the. bash_profile file in the terminal's own user name.Export path=/usr/local/mysql/support-files/: $PATH pathThen terminal input sudo mysql.server (start start
It turns out, if not often with the code, the statement deal with, people will be over face not, the brain will feel a face, do not know what to do wrong, this long memory, the statement, not only to strengthen the memory of the SQL statement, but
Classification of SQL statements by function (definition, manipulation, control, query)
DDL data Definition language, defining tables, libraries, views
DML Add, modify, and delete operations on data table records
DCL authorization, transaction
MySQL is a database management system, mainly to the database to increase, modify, delete, query, with case-insensitive characteristics (input in uppercase, lowercase can be)1. Basic commandsMySQL can log in directly through CMD, login command line:
Common MySQL operation and maintenance commands
1. Change Password:
Mysqladmin-u root-p password New password
Enter the old password.
2. Export the entire database:
Mysqldump-u username-p Database Name> exported file name
3. Import the database:
Go
1. MySQL database operation 1. createdatabase syntax for creating database commands: createdatabase database name. When creating a database, the database name has the following rules: 1. It cannot be the same as other databases; otherwise, an error
Mysql Single Table, mysql Single Table maximum number of rows
Create and delete DatabasesBlack window to start the Database Service: net start mysqlDisable Database Service: net stop mysql
Create a databaseUse the keyword create
Basic Review of MYSQL and JDBC (I), basic review of mysqljdbc
1. Basic Database review:
1.1 What is a database? In essence, it is a file system. You can use SQL to add, delete, modify, and view data in the database.
1.2 common databases: MYSQL is
Create database: create database [if not exist] name [character set encoding collate checking rule]
Show create database name
Delete A database: drop database [if exist] name
Backup Database: mysqldump-u username-p
Common MySQL database operations 1. display the database showdatabases; 2. Select the database use database name; 3. display the table showtables in the database; 4. display the table structure describe table name; 5. The SELECT * FROM table name is
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.