VPS Database Questions (accessing server, phpmyadmin, ssh)

vps

#1

I am totally new to VPS but giving it a try.

I have a few questions.

  1. How do I ‘access’ the servers (both the database and host server) rather than configuring settings. Can this be achieved though a panel?
  2. Can I access phpmyadmin? How?
  3. How do I ssh into servers?
  4. What basic syntax would I use to import a database that has already been FTP’d to my VPS Hosting server, into my VPS MySQL Server?

#2

I’m also new to VPS and have learned a lot from support and the WIKI. The WIKI is very good. Current and accurate. The only trouble I have is sometimes it takes a few attempts to get the search phrase worded the right way. One thing I like about DH is that they don’t force you in to creating several User accounts for different things, but you can if you want for extra securty.

To access the server, you will need to know the FTP host, User ID and Password, and a client that supports SFTP/SSH, like FileZilla. Also, the user account you use will have to have shell access. Log into the Control Panel and go into Users Management. Next to the user name, you will see if shell access is there. If not, go into Edit mode to enable it. Also, find the server name in the same row as the user name, under the columcn heading “Machine”. This is the prefix for your FTP host URL. This is mine (actual numbers replaced:

ps123456.dreamhostps.com.

I got the prefix from my users page, not sure where I got the rest. Keep in mind though it may not be the same for everyone. But that URL along with my user name and password and using the SFTP/SSH protocol, I got into the server, landing me in the “/home/my-user-name/” directory. This directory hold the site folders, and you can navigate up from there if needed.

For database and PHPMyAdmin, go to that page in the CP. Here you will find the database server URL and which user(s) is/are assigned to the database you want to administer. My server URL is “msql.xxxxx.dreamhosters.com”. Go to that URL i the browser and login with the User credentials assigned to that DB. (you can assign existing users to existing databases or new databases. or create new users for existing and new databases).

I don’t know about your other database question. Most of my DB experience has been with MSSQL, so I’m still learning MySQL administration. But, in the DH CP, I did find it very easy to create new and duplicate DBs, and backup and restore to and from local files. When I do go in to modify a DB, I will create a backup, and a duplicate. So if something goes wrong, I simply delete the original, make a duplicate of the duplicate giving it the original name and assigning the original user. This does depend on the site traffic - if it has constant use, I would need to take it offline for maintenance or temporarity disable certain features like registration.

HTH.


#3

FTP software as it stands for (file transfer protocol) like filezilla cannot be used to issue commands. Only to transfer and receive files with the option to alter the directory/file read access (CHMOD). You need a shell software for that such as putty or xshell.

That depends… You could go into PHPMyadmin and import a database from there. However, it doesn’t always allow that if the database is too large to import. You can use SHELL (putty or XSHELL) for this.

Once you downloaded putty or xshell (or any kind of other shell software)… Log into it with your host URL, username and password that is allowed to use shell access and run the following command:

mysql -h servername -u dbusername -p databasename< /path/to/backupname.sql

^

For example:

the servername is something you’ve setup through the dreamhost control panel. It’s the Hostname. The dbusername is the Users with Access under the control panel and the database name would be, well… whatever name you gave the database. the /path/to/backupname.sql should be the exact path to your sql filename. If for example it would be under /home/yourusername/stuff.sql the command should be:

mysql -h mysql.yourwebsite.com -u example_username -p example_database< /home/yourusername/stuff.sql

the “mysql” at the beginning of yourwebsite.com above is a full hostname (set through the DH control panel), so you don’t get confused that “mysql” has to be added. It’s easier to remember a hostname like that. If you need any help, let me know.


#4

Thanks for adding that info. I had used FileZilla because it was adequate for the one task I needed to do at the time - something simple like creating a new folder and copying a modified ini file to it, something along those lines.