hankknight
asked on
MySQL: Password has question mark in it
I do not have permissions to change my MySQL password.
It is:
password?123
Because there is a question mark in the password this fails:
In one line, how can pass my password, including the question mark?
It is:
password?123
Because there is a question mark in the password this fails:
mysql -u my_username -ppassword?123 show databases
In one line, how can pass my password, including the question mark?
ASKER
Neither of those ideas work for me. I am running FreeBSD.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Perhaps you can just escape it with a backslash?
mysql -u my_username -ppassword\?123 show databases
Does it accept your password if you do interactively like this?
I found out yesterday that some of my more recent MySQL installs do not accept the password on the command line, they require it to be entered interactively.
mysql -u my_username -p
I found out yesterday that some of my more recent MySQL installs do not accept the password on the command line, they require it to be entered interactively.
ASKER
This works:
mysql --user=user_name --password='password?123' --execute='SHOW DATABASES'
mysql -u my_username '-ppassword?123' show databases
or
mysql -u my_username -p'password?123' show databases
depending on your shell.
HTH,
Dan