MySQL is a relational database (relational databases Management System), this so-called "relational" can be understood as the concept of "table", a relational database consists of one or more tables, a table:
- header (header): The name of each column;
- column (Row): A collection of data of the same data type;
- Row (col): Each line is used to describe the specific information of a person/thing;
- value: The specific information for the row, each value must be the same as the data type of the column;
- Key: A method in a table that identifies a particular person \ object, and the value of the key is unique in the current column.
Configuration for MySQL under Windows
For example, download mysql-noinstall-5.1.69-win32.zip (official download page: http://dev.mysql.com/downloads/mysql/5.1.html#downloads) with MySQL 5.1 free install version
Configuration steps:
1. Unzip the downloaded Mysql-noinstall-5.1.69-win32.zip to the location where it needs to be installed, such as: C:\Program Files;
2. Locate the My-small.ini configuration file under the installation folder, rename it to My.ini, open for editing, and add a line under [client] and [mysqld]: default-character-set = gbk< /c4>
3. Open the Windows environment variable settings, new variable name mysql_home, the variable value is the MYSQL installation directory path, here is C:\Program Files\mysql-5.1.69-win32
4. Add the Path variable to the environment variable ;%mysql_home%\bin;
5. Install the MySQL service, open the Windows command prompt, execute the command: mysqld--install MySQL--defaults-file= "My.ini" prompt "service successfull Y installed. " Indicate success;
Start, stop, and uninstall of MySQL service
Run at the Windows command prompt:
Startup: net start MySQL
STOP: net stop MySQL
Uninstall: SC Delete MySQL
Basic composition of MySQL scripts
Like the regular scripting language, MySQL also has a set of rules for the use of characters, words, and special symbols, and MySQL executes SQL scripts to perform operations on the database, which consists of one or more MySQL statements (SQL statement + extension statements), and the script file suffix is typically. s when saved. Ql. Under the console, the MySQL client can also execute a single sentence without saving the. sql file.
Identifier
Identifiers are used to name objects, such as databases, tables, columns, variables, and so on, to be referenced elsewhere in the script. MySQL identifier naming rules are a little cumbersome, and here we use universal Naming conventions: Identifiers consist of letters, numbers, or underscores (_), and the first character must be a letter or an underscore.
The case sensitivity of identifiers depends on the current operating system and is not sensitive under Windows, but for most Linux\unix systems These identifiers are case sensitive.
Key words:
MySQL is a lot of keywords, not listed here, learning in the study. These keywords have their own specific meanings and try to avoid them as identifiers.
Statement:
The MySQL statement is the basic unit that makes up the MySQL script, and each statement can accomplish a specific operation, which consists of the SQL standard statement + MySQL extension statement.
Function:
MySQL functions are used to implement some of the advanced functions of database operations, which are broadly divided into the following categories: String functions, mathematical functions, date-time functions, search functions, cryptographic functions, information functions.
Introduction to MySQL related concepts