Quote:
Originally Posted by yang
4, Open it with a text editor program. - Notice this part of the code:
CREATE DATABASE IF NOT EXISTS SHeroDB;
USE SHeroDB;
GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost;
Here "SHeroDB" is the database name.
The user is SuperHeroModUser Restricted to: localhost
I prefer to have a password on it. So I switched it to:
GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost IDENTIFIED BY 'password';
Close & Save.
5, Put it into C: drive.
6, Open DOS Command ( Start -> Run -> type "cmd" )
7, Go into your mysql/bin folder
8, Type "mysql -uroot -ppassword < C:\shero.sql" - This will automatically create a superhero database for you.
|
what should i do? should i copy
GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost IDENTIFIED BY 'password';
and paste it instead of the old one:
CREATE DATABASE IF NOT EXISTS SHeroDB;
USE SHeroDB;
GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost;
Then when i write mysql -uroot -ppassword < C:\shero.sql
i get this error:
ERROR 1045 <28000>: access denied for user 'root'@'localhost' <using password YES>
i haven't selected a password, i just copied it and pasted it instead of the old one.