From: Siju George on
Hi,

mysql -u root -pmy\$qlPW -N -B -e 'show databases'

gives the right output but

`mysql -u root -pmy\$qlPW -N -B -e 'show databases'`

gives

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)

I hope it is the escaping issue with $ inside ``?

How do you do that?

thanks

--Siju


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/r2vb713df2c1004210114gb50d1141k46180a717d79566d(a)mail.gmail.com
From: Nick Douma on
On Wed, Apr 21, 2010 at 01:44:33PM +0530, Siju George wrote:
> Hi,
>
> mysql -u root -pmy\$qlPW -N -B -e 'show databases'
>
> gives the right output but
>
> `mysql -u root -pmy\$qlPW -N -B -e 'show databases'`
>
> gives
>
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: YES)
>
> I hope it is the escaping issue with $ inside ``?
>

When using single quotes ('), everything in the string is literal, so no escaping is required. You only need escaping when using double quotes (").
From: Siju George on
On Wed, Apr 21, 2010 at 2:01 PM, Nick Douma <n.douma(a)nekoconeko.nl> wrote:
>>>
> When using single quotes ('), everything in the string is literal, so no escaping is required. You only need escaping when using double quotes (").
>

It is not quotes '' but `` :-)

thanks

--Siju


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/i2nb713df2c1004210141vc61462aaqd9add3d8934a6cae(a)mail.gmail.com
From: Mart Frauenlob on
On 21.04.2010 10:14, Siju George wrote:
> Hi,
>
> mysql -u root -pmy\$qlPW -N -B -e 'show databases'
>
> gives the right output but
>
> `mysql -u root -pmy\$qlPW -N -B -e 'show databases'`
>
> gives
>
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: YES)
>
> I hope it is the escaping issue with $ inside ``?
>
> How do you do that?
>
> thanks
>
> --Siju

how about:
.... -p 'my$qlPW' -N ...
or
.... -p "my\$qlPW" -N ...
or
.... -p my\\\$qlPW -N ...


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4BCEBB7B.5010800(a)chello.at
From: Siju George on
On Wed, Apr 21, 2010 at 2:16 PM, Mart Frauenlob
<mart.frauenlob(a)chello.at> wrote:
>
> how about:
> ... -p 'my$qlPW' -N ...
>

# `mysql -u root -p 'my$qlPW' -N -B -e 'show databases'`
Enter password:

asks for PW

# `mysql -u root -p'my$qlPW' -N -B -e 'show databases'`
-bash: information_schema: command not found

> or
> ... -p "my\$qlPW" -N ...
>

# `mysql -u root -p "my$qlPW" -N -B -e 'show databases'`
Enter password:

again asks for password

# `mysql -u root -p"my$qlPW" -N -B -e 'show databases'`
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)


> or
> ... -p my\\\$qlPW -N ...
>

# `mysql -u root -p\\\my$qlPW -N -B -e 'show databases'`
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)

# `mysql -u root -p \\\my$qlPW -N -B -e 'show databases'`
Enter password:

Thanks :-)

--Siju


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/p2pb713df2c1004210157rbd1eed9clc11e1f8b7f6cfe52(a)mail.gmail.com