mysql常用命令汇总

使用mysqldump:
备份
mysqldump -u databasename -p -h localhost databasename>d:demo.sql
还原
mysql -h localhost -u root -p123456 databasename<d:demo.sql

开启mysql的root用户远程访问权限:
use mysql;

update user set host = ‘%’ where user = ‘root’;

FLUSH PRIVILEGES;

    原文作者:馒头
    原文地址: https://segmentfault.com/a/1190000018232991
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞