Questions regarding a migrate

Hey DO,

Stoked to finally be doing my own hosting, however i’ve run in to a few issues. I have a droplet with nginx installed. I have a site that I am trying to migrate over (have all the files and database ready to go). I followed the getting started tutorials, including have my SSH setup, with daemon configured.

  1. The issue that I’m having is that when trying to add my zip file of my site to domain/htdocs via ftp (coda) I get a permissions error. Now I read I only have access to my user files. So what is the proper or better way of doing this? Ive looked and can’t find any info.

  2. I’m trying to upload my new database (which i have inserted via ftp to my /home/userfolder) using this command : mysql -u (user) -p DB < newDB
    i get this error ERROR 1045 (28000): Access denied for user ‘user’@‘localhost’ (using password: YES) as you may have guessed all of my passwords do not work

I feel like if I could log back into root access I wouldn’t be having this issue, but I’ve disabled root access as a security precaution. Am I missing something or did I just screw this up? Any help would be greatly appreciated. Thank you guys keep up the good work!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

To unzip the files you need to have root Access (Directory is owned by www-data)

  1. sudo unzip /target/ (/var/www/html)

You need to create a new MySQL user

  1. sudo su
  1. mysql -p DB
  1. GRANT SELECT ON DB.* TO 'user'@'' IDENTIFIED BY 'userpasswd';
  3. exit
  1. exit

If it does not work, just ask !!!