Hello all,
During the installation I need to create new MySQL user, new database and populate it from dump file. My question is how can I do it from command line (cmd, Windows)? I mean, I'm calling for cmd from some script, which can start mysql command line client with root privileges but I cannot pass parameters to mysql form outside.
E.g. to create new user I'd like to run something like this:
cmd /c mysql -u root -p GRANT ALL ON *.* TO 'newuser'@'localhost' IDENTIFIED BY 'pass';
Is it possible? To pass *"GRANT ALL ON . TO 'newuser'@'localhost' IDENTIFIED BY 'pass';"* as parameter to mysql?
I hope I've made myself clear. Thanks in advance.