1.修改密码:
格式:mysqladmin -u用户名 -p旧密码 password 新密码
2.备份还原数据库:
备份所有数据库:
mysqldump -u root -p123 --all-database > test.sql
备份数据库test
mysqldump -u root -p123 test > test.sql
备份数据库test下的temp表:
mysqldump -u root -p123 test demp > test.sql
还原数据库test
mysqldump -u root -p123 test < test.sql
还原数据库test下的temp表:
mysqldump -u root -p123 test demp < test.sql
但是有时候这样还原不了,那就进入mysql控制台,使用命令:
source test.sql
格式:mysqladmin -u用户名 -p旧密码 password 新密码
2.备份还原数据库:
备份所有数据库:
mysqldump -u root -p123 --all-database > test.sql
备份数据库test
mysqldump -u root -p123 test > test.sql
备份数据库test下的temp表:
mysqldump -u root -p123 test demp > test.sql
还原数据库test
mysqldump -u root -p123 test < test.sql
还原数据库test下的temp表:
mysqldump -u root -p123 test demp < test.sql
但是有时候这样还原不了,那就进入mysql控制台,使用命令:
source test.sql