Forum posts for mysqld-nt.exe

how to get around The '--' operator works only on variables or on properties

I'm following the instructions from the mysql site on resetting the mysql server's password on a windows machine..

copying the command verbatim:

C:> 'C:Program FilesMySQLMySQL Server 5.0inmysqld-nt.exe'
--defaults-file='C:\Program Files\MySQL\MySQL Server 5.0\my.ini'
--init-file=C:\mysql-init.txt


gives me this error (abbreviated):

Unexpected token 'defaults-file='C:Program FilesMySqlMysql Server 5.0my.ini''
in expression or statement.

The '--' operator works only on variables or on properties.

+ CategoryInfo :ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId :UnexpectedToken


I looked around and found this suggestion:


Try this:

$cmd= {cmd /c 'C:Program FilesPostgreSQL8.3inpg_dump.exe
'--encoding=UTF8 --verbose --create --username=postgres --
file=C:dbWednesday.pg DB''}

&$cmd

-- is the Powershell decrement operator. To make it 'mundate', it needs to be enclosed in single quotes to suppress parsing it as an
operator. You could also escape all the hyphens with backticks, but
that's going to get really ugly.


I tried following that format.. ie

$cmd = {cmd /c 'C:Program FilesMySQLMySQL Server 5.0inmysqld-nt.exe
'--defaults-file='C:\Program Files\MySQL\MySQL Server 5.0\my.ini
--init-file=C:\mysql-init.txt''}
&$cmd


but then i got this error:

'C:Program' is not recognised as an internal or external command


I also tried doing the back tick escaping:

C:> 'C:Program FilesMySQLMySQL Server 5.0inmysqld-nt.exe'
`-`-defaults-file='C:\Program Files\MySQL\MySQL Server 5.0\my.ini'
`-`-init-file=C:\mysql-init.txt


but also got an error (abbreviated):

unexpected token '`-`-defaults-file.. ' in expression or statement


any ideas?

View complete forum thread with replies

Other posts related to mysqld-nt.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

mysqld-nt.exe exist in task list,but actually it's not running?
taskkill Mysql from .ASPX — Permission Problems?
how to get around The '--' operator works only on variables or on properties
MySQL stops working every five to six hours
Mysql server not starting in xampp
recover data using ibdata1 file mysql
Getting error 2003 when trying to connect to MySQL server after reboot
What's the difference between IN and INNER JOIN in my case?

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.