Create a database in Ubuntu, for example, tempmysql-hlocalhost-uroot-ptemplt; homepttest. SQL will prompt you to enter the password and enter OK. 2. Import
Create a database in Ubuntu, for example, tempmysql-h localhost-u root-p templt;/home/pt/test. SQL will prompt you to enter the password and enter OK. 2. Import
First, build a database in Ubuntu, such as temp.
Mysql-h localhost-u root-p temp
You will be prompted to enter the password.
2. import data:
The syntax is mysqldump-opt database name <c: \ data. SQL
The example is mysqldump-hlocalhost-uroot-p123456 zf or
Mysqlimport-hlocalhost-u root-p123456 <c: \ data. SQL
3. Import text data to the database:
Use Database Name;
Load data local infile "file name" into table name;
Step 6: Create a database table
Create table mytable (name VARCHAR (20), sex CHAR (1 ));
7. Add records to the table
Insert into table name values ("1", "2 ″);
8. Use text to load data into database tables
Load data local infile "c:/data. SQL" INTO TABLE name;
9. Import the. SQL FILE command (for example, c:/data. SQL)
Use database;
Source c:/data. SQL
10. Update table data
Update MYTABLE set sex = "f" where name = 'hyq ';
11th repair table
Repair table name
12th view the table size
Show table name status
13th Change Password
Mysqladmin-u username-p old password "new password"
14th Modify Table Structure
Alter table t1 MODIFY B BIGINT NOT NULL;
14th quit MYSQL Command
Exit or quit (Press ENTER)