MySQL now set up and running on my homeserver

Today I set up MySQL and managed to transfer a Pligg CMS over from my paid hosting to my home server. Had a few problems to start with, as I was trying to use phpmyadmin (also installed today) to import the .sql file, but this was resulting in errors. I attempting to increase the max timeout, upload file size and some other parameters, but it kept failing. However, a quick call to my pal over Skype got me sorted out. He actually logged on to my server over SSH to take control, and taught me along the way how to do it all from the command line.

He got into the Mysql prompt with:

mysql -u user -p

and then used this to import the database:

mysql -u user -p database < database.sql

I had already copied the exported the database from my paid hosting account using phpmyadmin, and created the .sql file. So the above commands simply allow a use to enter the mysql prompt (password for the relevant database is required) and then imports the .sql file into the database. Worked a treat. Once again, like I mentioned before about installing applications, this process was much quicker with the terminal than using the browser / php tools. In fact, when trying to back up a database using phpmyadmin I would often find that it seems to crash the browser – maybe it runs out of memory, not sure, but I now know the correct way to do it.

I also backup up my .sql database tonight with this command:

mysqldump -u user -p database > databasebackup

Again the -p means that the password is requested before the command is completed. Next step is to work out how to restore a database in the command prompt. That can wait until later though.

I seem to have one problem at the moment that requires fixing. On installing the CMS application on my home server, I did get an error message. It was something about the f_name I think. I notice now that I cannot configure the CMS, although I can post articles and comments etc. So that needs to be looked at. There are a few things not working on my server, but nothing major yet!

Leave a Reply

Your email address will not be published. Required fields are marked *