Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2011
    Posts
    80

    Copy files/subfolders to another folder in VPS

    Hello.

    I have a VPS with Debian 6.0 installed on it.

    I have pretty simple question I guess for those who knows better.

    For example, I have a folder called /test1/ and inside that folder files and subfolders.

    I need to copy those files and subfolders inside /test1/ folder to another folder. I don't wanna copy /test1/ folder but the files and subfolders inside it.

    Is there any easy way of doing that?

    Thanks!

    P.S.
    I tried cp -R /test1/ /destinationfolder

    But it copies the whole test1 folder

  2. #2
    Join Date
    Mar 2009
    Posts
    3,816
    cd test1;
    cp -R * dest

  3. #3
    Join Date
    Jun 2009
    Posts
    1,219
    Try cp -R /test1/* /destinationfolder

  4. #4
    Join Date
    Mar 2011
    Posts
    80
    Thank you! It worked.

    One more question and sorry for bothering.

    I have phpmyadmin installed and mysql of course.

    But when I want to connect any application to the database with hostname 'localhost' it cannot be connected.

    Is there any way to find out full mysql hostname address (like the ones on godaddy hosting)?

  5. #5
    Join Date
    Feb 2012
    Posts
    47
    It would be better you can use existing registered domain. You just need to create subdomain and install your phpmyadmin into subdomain then point to your IP address after that you can access phpmyadmin anywhere.

  6. #6
    Join Date
    Mar 2011
    Posts
    80
    I did install phpmyadmin, I can log in as root, everything works well there.

    The problem is when I want to install some application, for example SMF forum.

    In the field of mysql hostname, I enter localhost, but it doesn't wanna connect.

    In VPS error log it says that it cannot connect to a database so I assume something localhost does not work for some reason.

    So I was hoping there some way, either through SSH or somehow, to find out the full mysql hostname address, like godaddy is providing.

    Thanks.

  7. #7
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Oh dear. GoDaddy and the like provide a full hostname because the database server is on a different physical machine. In your case, with everything running on the one VPS, you should use localhost.

    As root, did you set up the database and database user for the application? eg.
    Code:
    CREATE DATABASE dbname;
    GRANT ALL ON dbname.* TO dbuser@localhost IDENTIFIED BY "secretpassword";
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  8. #8
    Join Date
    Mar 2009
    Posts
    3,816
    Quote Originally Posted by foobic View Post
    Oh dear. GoDaddy and the like provide a full hostname because the database server is on a different physical machine. In your case, with everything running on the one VPS, you should use localhost.

    As root, did you set up the database and database user for the application? eg.
    Code:
    CREATE DATABASE dbname;
    GRANT ALL ON dbname.* TO dbuser@localhost IDENTIFIED BY "secretpassword";
    if he didnt' set it up himself it might not have loaded networking and used a socket

  9. #9
    Join Date
    Jun 2011
    Location
    Woodbridge, NJ
    Posts
    840
    Quote Originally Posted by juventus View Post
    I did install phpmyadmin, I can log in as root, everything works well there.

    The problem is when I want to install some application, for example SMF forum.

    In the field of mysql hostname, I enter localhost, but it doesn't wanna connect.

    In VPS error log it says that it cannot connect to a database so I assume something localhost does not work for some reason.

    So I was hoping there some way, either through SSH or somehow, to find out the full mysql hostname address, like godaddy is providing.

    Thanks.
    localhost should work.

    Did you create a database and database user for the SMF forum, and grant privileges on that database for the user?

Similar Threads

  1. Move or copy files from one folder to other
    By gamejump in forum VPS Hosting
    Replies: 3
    Last Post: 06-30-2011, 08:00 AM
  2. how to restrict/redirect access to folder but not subfolders?
    By vitalis in forum Hosting Security and Technology
    Replies: 2
    Last Post: 11-15-2006, 12:28 AM
  3. How to copy files and folder using ASP
    By geof90 in forum Programming Discussion
    Replies: 1
    Last Post: 07-26-2004, 12:26 PM
  4. CHOWN a whole directory + subfolders + files
    By zmontano69 in forum Hosting Security and Technology
    Replies: 6
    Last Post: 02-14-2004, 01:00 AM
  5. Copy certificate files to a folder on another disk
    By nogi in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-30-2003, 11:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •