Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

quotes in cron jobs !? [moved]

Discussion in 'Database Discussion' started by dexter01, Jul 30, 2006.

  1. dexter01

    dexter01 Registered

    Joined:
    Jul 30, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    tryin' to use cronjobs .. and I need to add something like .. mysql -u user --password=stuff -h localhost -e "use db; update table set thing=1;" .. but .. after the cronjobs are updated .. and I select cronjobs again .. nothing after -e appear ! .. so .. it's something about the quotes .. tried "" .. \" ... nothing works .. I even tried ascii .. how can I get the quotes there ?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Try using single quotes, or doing it from shell:

    crontab -e
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dexter01

    dexter01 Registered

    Joined:
    Jul 30, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    I don't have ssh access .. but I can see the result by tryin' on my localhost ( I use linux and have a mysqld )

    mysql -u root -e 'use smser;'

    ERROR 1049 (42000): Unknown database 'smser;''

    mysql -u root -e 'use smser;
    ERROR 1049 (42000): Unknown database 'smser;'

    mysql -u root -e 'use smser'
    ERROR 1049 (42000): Unknown database 'smser''

    mysql -u root -e 'use smser
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the ma
    nual that corresponds to your MySQL server version for the right syntax to use n
    ear ''use' at line 1

    mysql -u root -e 'use smser;
    ERROR 1049 (42000): Unknown database 'smser;'

    mysql -u root -e `use smser;
    ERROR 1049 (42000): Unknown database 'smser;'

    mysql -u root -e `use smser;`

    ERROR 1049 (42000): Unknown database 'smser;`'

    mysql -u root -e `use smser;
    ERROR 1049 (42000): Unknown database 'smser;'

    mysql -u root -e 'use smser;
    ERROR 1049 (42000): Unknown database 'smser;'
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice