Tags: Install SQL build requires Environment 9.png ROS AMD Technology share1. Setting up a connection database in setting.py
DATABASES = { ' Default ': { ' ENGINE ': ' Django.db.backends.mysql ', ' NAME ': ' djangotest ', ' USER ': ' Root ', ' PASSWORD ': ' Root ', ' HOST ': ' 127.0.0.1 ', ' PORT ': ' 3306 ' }}
When using migrate to generate the data table will be prompted not to connect to the MYSQLDB
Usage of mysqlloaddatainfile (importing 40 W data to mysql in 3-5 seconds) bitsCN.com
If you want to import Chinese data, the utf8 character set in mysql will save the UTF-8 character set for the xxx.txt file you want to import. the command load data infile "d: /Websites/Sxxxx/test1.txt "ignore into table 'names' field
rows affected (0.01 sec)• Completely delete the database:Drop database db1;mysql> drop Database db1; Query OK, 1 row affected (0.01 sec)
13.6 MySQL Database backup recovery• Backup library:Mysqldump-u User name-p password Database > backup data file path[Email protected] ~]# mysqldump-uroot-p123456 mysql >/tmp/mysql.sql(Too much data is not listed)•
Mysql study 5: SQL statement study 3 well, we think this font is quite nice, and we will change it all. The INSERTINTO statement is used to Insert a new row into the table. Syntax: INSERTINTO table name VALUES (,...) We can also specify the column to insert data: INSERTINTOtable_name (column 1, column 2 ,...
Mysql stud
Tags: databases mysql SQL databaseFirst, the cmd common MySQL related commandsmysql-d,--database=name//Open Database--delimiter=name//Specify delimiter-H,--host=name//server name-P,--password[=name]//password-P,--Port[=name]//Port number--prompt==name//Setup prompt-U,--user=name//user name-V,--version//output version numberCan be used in combination, such as input-uusernam-ppassword login user name usrname
One, the CMD frequently uses the MySQL related commandmysql-d,--database=name//Open Database--delimiter=name//Specify delimiter-H,--host=name//server name-P,--password[=name]//password-P,--Port[=name]//Port number--prompt==name//Setup prompt-U,--user=name//username-V,--version//output versionAble to use combination, such as input-uusernam-ppassword login username for usrname password for password accountII. Basic data typesIntegral type:1) TINYINT 2)
order_num =20005;
SELECT Vend_name, UPPER (vend_name) as vend_name_upcase from vendors ORDER by Vend_name; SELECT Cust_name, cust_contact from Customers WHERE SOUNDEX (cust_contact)=soundex ('Y Lie');
SELECT Cust_name, cust_contact from customers; SELECT cust_id, order_num from orders WHERE order_date='2005-09-01'; SELECT cust_id, order_num from Orders WHERE DATE (order_date)='2005-09-01'; SELECT cust_id, Order_num, order_date from Orders WHERE date (order_date) between'2005-09-01'and'2005-09-3
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.