I am unable to find the phpMyAdmin panel so as to upload my database files. I was hinted that i could import my files through the CLI with the command (below) after i have uploaded my sql file in the home directory. mysql -u root -p $database
I have done so much and on entering the command, it displays a ‘Welcome to SQL monitor’. However, after that, i am neither able to upload my db files (if they aren’t already there). And if they are supposed to have been uploaded with that command, then I’m unable to see the tables and data. Also, my site isn’t working. So , how exactly do I upload my db files?
Could someone please help me out? Does it require me to install phpMyAdmin somewhere first? (I am using a Windows machine.) And if so, how?
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!
You will first want to upload your .sql file to your droplet using an SFTP client like Filezilla. Then, in the directory where your .sql file is located you can run
mysql -u username -p database_name < file.sql
to import your database’s tables and data. This will only populate a database and not create one so if you have not yet created the empty database you will need to do so with:
mysql -u username -p
This will get you to an interactive mysql shell. You can then run the following to create your database.
CREATE DATABASE mydatabase;
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.