13. Modify the root password
set password for "root"@"localhost"=password("123") Change the root password to 123
14. Create a new user
create user "s"@"x" identified by "m" s -username x-connection address m-password
If x is an exact ip address, this allows local ip access, if it is %, it allows external network access
15. Query the user list
select user, host from mysql.user; query the mysql library The user column and host column of the user table in the table query all users.
16. When the mysql command is wrong, it cannot return to the interface of re-entering the command; enter c before the end.
17. Modify to indicate
alter table y rename x; y- original table name x- new table name
18. Delete database, delete table
drop databases k;
drop table b; k- library name b- table name
19. Backup
data of database After the backup needs to exit the database management view, execute the command
mysqldump -uy -pm km > ml; y-username m-password km-library name ml-the path or file name to be backed up
20.
To restore the database restore data, exit the database management Execute command after view
mysql -uroot -p wll<d:\root.sql wll-library name
Note:
ERROR at line 468: Unknown command '\''. -Indicates that there is a problem with the character set, and it
will appear according to the original method. The
solution for incomplete data restoration is as follows
mysql -uroot -p --default-character-set=utf8 wll<d:\root.sql
set password for "root"@"localhost"=password("123") Change the root password to 123
14. Create a new user
create user "s"@"x" identified by "m" s -username x-connection address m-password
If x is an exact ip address, this allows local ip access, if it is %, it allows external network access
15. Query the user list
select user, host from mysql.user; query the mysql library The user column and host column of the user table in the table query all users.
16. When the mysql command is wrong, it cannot return to the interface of re-entering the command; enter c before the end.
17. Modify to indicate
alter table y rename x; y- original table name x- new table name
18. Delete database, delete table
drop databases k;
drop table b; k- library name b- table name
19. Backup
data of database After the backup needs to exit the database management view, execute the command
mysqldump -uy -pm km > ml; y-username m-password km-library name ml-the path or file name to be backed up
20.
To restore the database restore data, exit the database management Execute command after view
mysql -uroot -p wll<d:\root.sql wll-library name
Note:
ERROR at line 468: Unknown command '\''. -Indicates that there is a problem with the character set, and it
will appear according to the original method. The
solution for incomplete data restoration is as follows
mysql -uroot -p --default-character-set=utf8 wll<d:\root.sql