1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, new accounts will need to make at least one (valid) post.
    Otherwise, we will periodically purge all users without posts or that haven't confirmed their account.

Forbiden character in MySQL password?

Discussion in 'Installation / Upgrade Questions' started by malta, Feb 20, 2008.

Thread Status:
Not open for further replies.
  1. malta

    malta New Member

    Hi.

    After using Easy PHP Calendar with a flat db file for a while I decided to switch to a MySQL database. The problem is that I was given a password to the database by our sysadmin that contains the characters $ and @ ( $xxxx@x ) , and when I enter it in EzPHPCal's setup manager I get the access denied error [Access denied for user 'webadm'@'localhost' (using password: YES)]. I should also mention that once the page is reloaded only the @ and the following character reappear in the setup manager's mysql password field; hence I concluded that the full password is not being passed to the database. I've already tried to enter the password manually in config.inc.php and to escape the aforementioned characters with backslashes...

    Considering that this password is already used in other corporate applications I really don't want to request the sysadmin to change it, so I was wondering if there is a workaround for this issue.

    Thanks.
     
  2. Brian

    Brian EPC Developer Staff Member

    Try manually editing the config.inc.php file and add your password there.
     
  3. ve9gra

    ve9gra Support Team

    I really don't know how to deal with this one...
     
  4. Brian

    Brian EPC Developer Staff Member

    I didn't catch that the first time through. :ugh:
     
  5. ve9gra

    ve9gra Support Team

    At first I thought it was because of the @, but after I re-read the post, I now believe that the problem is with the first character being $...

    Is it possible that the script somehow thinks that $xxxx@x is a variable? Or rather $xxxx be a variable that is to be appended to @x? Since $xxxx doesn't exist, only "@x" show up in the Setup Manager.

    This is going back to PHP string handling... So if I'm correct, you should be able to enter \$xxxx@x in the Setup Manager and make it work. Do not escape the @ as it is not a special character in a PHP string.
     
  6. malta

    malta New Member

    Thanks a lot for the quick replies. I got a connection to the database.

    I had already tried to escape the $, but I still couldn't connect to the database even though the password was properly saved in the config file. The solution was to escape an extra backslash to be processed when EzPHPCal tries to connect to the database, that is, after the config file is saved. So I entered "\\\$xxxx@x" instead of only "$xxxx@x" in the password field.

    It looks kinda funny, but it's enough to get it going...
     
Thread Status:
Not open for further replies.

Share This Page