MySQL Add data 1, new database user
New Feiyu database user allows login at all IP addresses
mysql> create user ' Feiyu ' @ '% ' identified by ' 123 ';
New Guest database user allows all addresses to be logged in the 192.168.1 network segment
mysql> create user ' guest ' @ ' 192.168.1.% ' identified by ' 123 ';
Note: A new database user is created with the following login error as the default password error
There are two types of solutions: (below)
(1) This method can only resolve the normal user password logon does not error, but does not resolve the default password errors at all
First turn off the MySQL service
Add--skip-grant-tables at startup
(2) This method to modify the MySQL configuration file, you can completely resolve the default password error
Delete User-empty records in MySQL
2. New hehe Database
Create database name;
3, new table (two ways)
(1) New user table CREATE table name (field definition ...) under hehe database path;
(2) The new table is not in the current path and specifies the path to the Create tables library name. Table name (field definition ...);
4, add records in the table (two ways)
(1) in the current path of the user table, add the Zhangsan record
(2) The new Lisi record is not in the current path of the user table and specifies the path
5. New table structure (two ways)
(1) New phone field in the current path of user table
ALTER TABLE user add phone char (2);
(2) The new phone field is not in the current path of the user table and the specified path
ALTER TABLE Hehe.user add phone char (2);
6. Specify the storage engine when creating tables
Mysql>create Table table Name field engine= engine;
MySQL additions and deletions--the increase