Hi there, My website is hosten on an amazon server and unfortunately I do not have access to the phpMyAdmin which was setup for the database. I do however have the Amazon server key and I'm sure I have the other details required to access it via Terminal. Is there a way to pull the database from my Amazon server via Terminal (or an internet browser). Thank you!
Yes. if you have SSH access then access your server form their then connect to mySQL by issuing following command: > mysql -u yourusernamegoes here -p YourPasswordGoesHere once you login in to mySQL if you have access or else then you have to contact them to give you back up... but if you did then you dump the database from mySQL command to your server or in some external location by following command >mysql -u username -p databasename < path/example.sql the path is where you want your database file to be save regards
Thanks for the reply! I have SSH access but not sure of the username or password as it was setup by someone else. That being said, I can access the Amazon console via the browser (to see my instances etc). Not sure if I can grab my uploaded site files and database from there? Thanks!
Use mysqldump command via terminal for taking the backup, for that you need db username and password. In Command Prompt type the following to create the dumpfile: mysqldump -h host -u user-p databaseName > dumpFile.sql If you don't know the password, try to reset the same using mysql-safe method else contact amazon support team for assistance.
A little updated. I got access to the Amazon EC2 server via Cyberduck. I'm able to see folders such as bin, boot, dev, etc, home, lib, root, swapfile and many more. Would this help me?
Success! I pulled the database.php file from the server and found out the details. The problem is, I don't know where to login to access the phpmyadmin or mysql server. Right, I found the mysql folder using a SFTP connection (logged in as ec2-user with my pem key). The problem is, I don't have the permissions to download the var/mysql/<mydatabase> folder. Not sure what to do next.
normally, the phpmyadmin for the site would be phpmyadmin.domain.com or domain.com/phpmyadmin - I'm assuming neither of these work? You could try and see if you can find phpmyadmin installed somewhere on your server, or see (via the control panel, maybe?) if there's a link directly to it
Thanks for your reply, it's much appreciated. Luckily we managed to reboot the database and then access phpmyadmin (which was previously returning an error as the database was not live). So now everything is sorted! Cheers!