1.MySQL Create DB, delete DB command
Create database db;
drop database db;
field type of 2.MySQL
整型:tinyint,smallint,mediumint,int,bigint浮点型:float(m,d),double(m,d),decimal(m,d)字符串类型:char(n),varchar(n),tinytext,text,mediumtext,longtext日期和时间类型:date,time,datetime,timestamp,year枚举类型:enum(‘member1‘,‘member‘,...)参考:54982164
3. What is the syntax for building a table?
CREATE TABLE `tb_name` ( `id` int NOT NULL AUTO_INCREMENT, `column1` xxx, `column2` xxx, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
4. What is the tail of the normal syntax for a build table?
CREATE TABLE tb_name Start
Engine=innodb DEFAULT Charset=utf8; End
5. Talk about Insert syntax
Insert into Tb_name () values ();
6. Update syntax
Update tb_name set xxx= ' where xxxx= ';
7. Delete syntax
Delete from tb_name where xxxx= ';
8. See how many links MySQL has and what commands, how to kill? (not to confirm before killing)
Show Processlist;
Kill Id kills before killing to confirm
9. See what fields are in a table? Which two commands can be viewed
Desc Tb_name;
Show CREATE TABLE tb_name;
10. Allow user A to log in to the company's internal MySQL from any computer, ask what symbol identification
%
11. Create a DB and user permissions, what is the command of the password
GRANT all privileges in db . * to ' user ' @ '% ' identified by ' 123456 ';
12. About the operation of the user, permission, we have to knock on the last command, what is it? Flush Privileges;13.mysql-p 123456, right?
Wrong
14. What is the process of re-deploying MySQL?
Delete Arch and data directories
Perform scripts/mysql_install_db redeployment
15. Talk about your understanding of the MySQL character set
Database character set try to use UTF8 to reduce garbled characters
What are the commands for blurring view parameters in 16.mysql?
Show variables like '%xx% ';
20180510 Morning Lesson Records 07-mysql