export user db?

export user db?

Thomas Hirt -
Atsakymų skaičius: 4
Hello!
Does anyone know how to export the whole user Database?

We are running the site www.gympurkersdorf.ac.at/moodle for our highschool. Now we have to change server. Can Moodle export the whole user Database into a Text-File? Do I have to export some parts MySQL Database? How can I import the files into a this new Moddle instance if I have No Access to the MySQL Database (the new server is not our own)?

Thanks in advance
Thomas Hirt
Įvertinimų vidurkis: -
Atsakymas į Thomas Hirt

Re: export user db?

Jason Hando -
Hi Thomas,

If you want to recreate the site as is then yess, you do have to export (or dump) the database. Do you have access to PHPMyadmin to administer the sql database?

If so you can export the database using the export tab. Select all options under data and structure and then choose save as file and gzipped.

The resulting gzip can be imported into a new Moodle database on the new server (will require PHPMyadmin again).

If you don't have this much access then I would question using the new server - perhaps you should sign up with a remote web host that provides cpanel access with PHPMyadmin?

Cheers,

Jason

Hope this helps.
Atsakymas į Thomas Hirt

Re: export user db?

Just H -
Hi Thomas

Further to Jason's advice, might be worth installing MySQL Admin 2.6.2 to access your database from within Moodle.

Make sure when you have Moodle installed on the new server it includes MySql Admin (whoever is installing Moodle on the new server will have to set up the user and password for you when installing). Then you can recreate your site as per Jason's advice without needing "direct" access as such to your database.

Regards
H


Atsakymas į Thomas Hirt

Re: export user db?

Jon Witts -
Plugin developers paveikslėlis Testers paveikslėlis
Hi,

If you have access to the server with MySQL on it you can run this at the command line,
   
       mysqldump -u 'username' -p'password' --all-'dbname' > 'path to backup file'.sql

'username' is the username with access to your Moodle database, 'password' is this users password, 'dbname' is the database name that Moodle is installed to, and 'path to backup file' is the path and file name that you want the back up to goto, e.g. C:\moodledbbackup.sql on a Windows system.

The MySQL site has more info about the mysqldump function here.