The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

quotes in cron jobs !? [moved]

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

  1. dexter01

    dexter01 Registered

    Joined:
    Jul 30, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Try using single quotes, or doing it from shell:

    crontab -e
     
  3. dexter01

    dexter01 Registered

    Joined:
    Jul 30, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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