Hello there,
I have created a new raw Droplet (raw one), then using my command line I installed LAMP (installed MySQL server & PHP).
I brought my Drupal (databse.sql & public_html folder as Zip) from other hosting service by (wget).
I was able to unzip my public_html … and that works just fine.
But I am unable to import my database.sql to MySQL server (I don’t prefer to install and use PhpMyAdmin), I am new to this, and here are some questions:
1- Where should I put my database.sql file before importing? 2- Should I run mysql> command OR I just use my terminal shell and run “mysql -u -p database < database.sql… etc”? 3- how can I test that MySQL server is working good? how to test that my database.sql file has tables on it?
I need to ask this question because I want to have a good idea toward this action, you can say, I need your any knowledge regrading to that.
Any help is much appreciated !
Thanks -Batis
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!
Hello friend!
You are thinking in the right direction here. The location of the .sql file will not matter as you are going to import it into a database, which will then live in /var/lib/mysql (not using the .sql format). Check out the “Import” section of this article from a while back:
Kind Regards, Jarland
Thank you Jarland for your help… At the moment, I am on /var/www/html directory, and when I run the command: mysql -uUSER -p DATABASE < IMPORTED.sql I got nothing…
I run mysql > SHOW DATABASES; mysql > USE DATABASE; mysql > SHOW TABLES;
I find empty values !
Any idea?
Thanks Batis
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.