mysqldump -u [username] -p [database name] > [database name].sqlThe database that you selected in the command will now be exported to your server instance.
CREATE DATABASE newdatabase;Then log out of the MySQL shell and type the following on the command line:
mysql -u [username] -p newdatabase < [database name].sqlWith that, your chosen database has been imported into your destination database in MySQL.
/etc/init.d/mysql stop
sudo mysqld_safe --skip-grant-tables &Once safe mode has started up, log into MySQL and when prompted, use your standard root password.
mysql -u root mysql
update user set password=PASSWORD("newpassword") where User='root';Be sure to reload everything:
FLUSH PRIVILEGES;and you now have a new root password.
Article ID: 187
Created On: Thu, Dec 26, 2013 at 10:32 PM
Last Updated On: Sun, Jan 5, 2014 at 8:45 PM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=187