News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to backup database from MySQL itself.

Started by Galaxy Computers, June 05, 2009, 11:28:59 AM

Previous topic - Next topic

Galaxy Computers

How do I back up my Database from MySQL itself instead of going in admin? Because I am unable go into my admin.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Tristan Perry

If you have access to a control panel, log into that. You can then download a MySQL backup, or you can go into phpMyAdmin and export the database from there.

If you have SSH access you can backup via the mysqldump command:

mysqldump -Q -h localhost -u DB_Username -pDB_Password DB_Name > /home/account_name/folder_name/backup_name_date.sql

Galaxy Computers

How can I export the Database from phpMyAdmin from the server?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Tristan Perry

Quote from: mtechama on June 05, 2009, 11:58:39 AM
How can I export the Database from phpMyAdmin from the server?
You click on the export section? :)

Go into phpMyAdmin, select the database, and click the "export" tab/button. Scroll down, select the various options, and hit the submit button at the bottom of the page.

Try checking out this video tutorial:

http://www.dewahost.com/tutorials/cpanelx/dumpmysql.html

Galaxy Computers

I have did a Backup through phpMyAdmin and now it won't let me do a restore what do I need to do from here?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Antechinus

How are you trying to restore? Exactly what do you mean by "wont let me"? Are you getting any error messages?

Galaxy Computers

What I did I had to re-install a fresh new forum and database before I did a new database I did a backup of the database. Then after I install a new fresh database and try to restore the database of the backup I get this error:

Error
SQL query:

--
-- Database: `aids_forum`
--
CREATE DATABASE `aids_forum` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;



MySQL said: 

#1007 - Can't create database 'aids_forum'; database exists

Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Antechinus

Well yes, that makes sense. You can't have two databases with the same name. You'll need to drop the existing one before you import your backup.

Galaxy Computers

So that means I have to start everything over with a new database name. So I have to start everything over from scratch what a waste of time.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Antechinus

If you're trying to import a backup you're starting from scratch anyway. The import would wipe any existing data. Change the "Create database" query in the backup then. Make it say "aids_forum2" or whatever you like.

Galaxy Computers

I have created a new database from aids_forum to aids_forum2 then try to import the backup. I am still getting this error message:

Error
SQL query:

--
-- Database: `aids_forum`
--
CREATE DATABASE `aids_forum` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;



MySQL said: 

#1044 - Access denied for user 'aids_forum2'@'%' to database 'aids_forum'

What should I do from here?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

I click on Import and insert the file and click go.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

I my phpMyAdmin there is no privileges tab.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

Here are the tabs that is availible on the Database:

Databases |  SQL  |  Variables  |  Charsets  |  Engines  |  Processes  |  Export  |  Import

That is it.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

I just created a fresh new seprate database.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

I have done all that. Plus I don't see or find the settings.php file with SMF.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

Ok, I found the Settings.php and when type that in I just a white blank page.
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Galaxy Computers

You mean what user to log in into my phpMyAdmin or the forum? and how do I use the Settings.php file?
Wade Morris
Amarillo, Texas

Morris Technologies Computer Support Forum

Advertisement: