campsite-restore problem for user root without password
  • Vote Up0Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    when trying to restore a tarball, the campsite-restore script throws the below error. i guess this comes from the user/password that came with the tarball. how can i alter this to work with my new mysql configuration?
    $ ./bin/campsite-restore /home/micz/Downloads/backup-campsite-2010-05-29-00-55-11.tar.gz 
    
    Campsite Restore Utility
    ------------------------
     * Initializing...
       * Temp directory: backup-campsite-2010-05-29-00-55-11
       * Initialization done.
     * Extracting files into temp directory...done.
    
    Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /var/www/campsite/bin/cli_script_lib.php on line 323
    
    ERROR!
    Unable to connect to the database server.
    
  • 1 Comment sorted by
  • Vote Up0Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    i didn't read enough of the RTFM Smile simple solution: adding -e at the end of the line will tell the restore script to use the variables already set in my install.

    works beautifully. thanks.
    $ ./bin/campsite-restore /home/micz/Downloads/backup-campsite-2010-05-29-00-55-11.tar.gz -e
    
    Campsite Restore Utility
    ------------------------
     * Initializing...
       * Temp directory: backup-campsite-2010-05-29-00-55-11
       * Initialization done.
     * Extracting files into temp directory...done.
     * Backup database name is 'fluter_campsite_update'.
     * Destination database name (to be replaced) is 'campsite'.
    
     All files in the following directories will be deleted.
     (The backup files will be copied to these locations)
        /var/www/campsite/templates
        /var/www/campsite/images
        /var/www/campsite/files
        /var/www/campsite/templates_c
     Are you sure you want to continue? (y/N) y
    ...