By cloud508453
You answered my question about phpmyadmin but I can’t find it nor the command lines. I know how to SFTP my .sql file to the new droplet, but the mysql command to import it into the database is gone.
Seems like this entire site changed overnight and I just started!
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!
Thanks for all of those ways to import into mysql. I got that working. Yay.
Let’s say you want to import a mysql dump into a new database with a new user. <br>Where your mysqldump is source.sql <br> <br># Enter into MySQL using “root” user identified by password <br>mysql -u root -p <br> <br>#Create the database <br>mysql> CREATE DATABASE NEWDB; <br> <br>#Create the user <br>mysql> CREATE USER ‘newuser’@‘localhsot’ IDENTIFIED BY ‘newpass’; <br> <br>#Grant ALL privileges onthe new database to the new User <br>mysql> GRANT ALL PRIVILEGES ON NEWDB.* TO ‘newuser’@‘localhost’ IDENTIFIED BY ‘newpass’; <br> <br>#Switch to the New Database <br>mysql> USE NEWDB; <br> <br>#Insert data from source.sql <br>mysql> SOURCE source.sql
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.