简体   繁体   English

以管理员身份执行命令以通过CMD在Win7中还原mysql数据库

[英]Execute command as administrator to restore mysql database in win7 via CMD

I'm trying to restore a mysql backup in XAMPP - Windows 7 using the following command: 我正在尝试使用以下命令在XAMPP-Windows 7中还原mysql备份:

mysqlimport.exe -u username -p password nameOfNewDB < backupFile.sql

The machine I'm working on is attached to a network, so I checked my username using whoami and I got: 我正在使用的计算机已连接到网络,因此我使用whoami检查了用户名,并得到:

rms\johndoe

So I tried: 所以我尝试了:

mysqlimport.exe -u rms\johndoe -p password nameOfNewDB < backupFile.sql

it asks me for the password, after entering it, it says: 输入密码后,它要求我输入密码,并说:

Error: 1045 Access denied for user 'rms/johndow'@'localhost' (using password: YES) 错误:1045用户'rms / johndow'@'localhost'的访问被拒绝(使用密码:是)

Then I tried only with johndoe, same error, then I tried using .\\admin (I've got the admin password), same error, I also tried .\\administrator, admin, administrator and nothing yet. 然后我只尝试了johndoe,同样的错误,然后尝试使用。\\ admin(我有管理员密码),同样的错误,我也尝试了。\\ administrator,admin,administrator,却什么也没有。

Note: I'm using cmd because the database is very large and I cannot do it using phpmyadmin. 注意:由于数据库很大,因此无法使用phpmyadmin来执行cmd。

Any suggestion? 有什么建议吗?

Thanks. 谢谢。

尝试使用root作为用户名和root用户的密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM