FN-GM Posted July 7, 2008 Posted July 7, 2008 With Xampp is it possible to automatically export a database account to a schedule? Thanks Z
Edu-IT Posted July 7, 2008 Posted July 7, 2008 I'm probably being thick but can you explain exactly what it is you're trying to do?
FN-GM Posted July 7, 2008 Author Posted July 7, 2008 Create Backups of the databases, If I schedule to export databases to a folder then get the backup software to backup that software.
ChrisH Posted July 7, 2008 Posted July 7, 2008 batch file or something. Stop service sqldump or equivalent start service
FN-GM Posted July 11, 2008 Author Posted July 11, 2008 HI, someone posted some commands to achieve this. They also stated not to stop the database. I think it was Jona but not 100%. Them posts have been lost because of the server going down. Please can you post them again Thanks
Jona Posted July 11, 2008 Posted July 11, 2008 Hi, Yeh it was me. We back up our mysql server (moodle) nightly and don't stop it, if fact if you do stop it as in kill the service you can't connect at all (fairly obviously) so I don't think you need to do this. The command is as follows: mysqldump -u mysqlUsername --password=mysqlPassword databaseName > c:\locationYouWantToSave\TheDatabase.sql If your path environment isn't set up correctly you may need to search for mysqldump on your hard disk and run it from there. Hope that helps. Cheers Jona 1
FN-GM Posted July 13, 2008 Author Posted July 13, 2008 Hiya, thanks for that works a treat Another question, do you know the command to export all databases? Thanks Z
Jona Posted July 13, 2008 Posted July 13, 2008 No worries, according to mysql you should be able to use mysqldump --all-databases. See: MySQL :: MySQL 5.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program Cheers Jona
FN-GM Posted July 14, 2008 Author Posted July 14, 2008 Hi when i try to import a database that has been exported using the command i get the attached error message. If works fine if i do it manually. Any ideas please? Thanks Z
Jona Posted July 14, 2008 Posted July 14, 2008 Are you using the --all-databases when exporting? If you aren't then you need to have a database selected before you try and import it, you could create a new test database for this purpose. When I do an import I ignore phpmyadmin and just do it directly from the command line using something like: mysql -h loclahost -P 3306 -u root --password=rootpassword testdb < c:\database\database.sql Guide here: How to Back Up and Restore a MySQL Database Cheers Jona
FN-GM Posted July 14, 2008 Author Posted July 14, 2008 I am using this one mysqldump -u mysqlUsername --password=mysqlPassword databaseName > c:\locationYouWantToSave\TheDatabase.sql I will try that tomorrow and let you know how i get on. Cheers Z
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now