SEARCH YOUR SOLUTION HERE  

I can't restore my database...

Hi

Guys i have been workin' with MySql recently. I have learned how to backup a database and it worked fine:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqldump -uroot -ptemenos test > backupfile.sql

After that i purposely dropped the test database. But when i tried restoring it, it gave me the following error:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -ptemenos test < backupfile.sql

ERROR 1049 (42000): Unknown database 'test'

Can't somebody help me out

Posted On: Monday 29th of October 2012 05:51:12 AM Total Views:  462
View Complete with Replies




Related Messages:

restore command   (268 Views)
Hi , I am working on mysql database as backend of our application. I amcreating a sql backup database, to restore that database i need mysql command. Can anybody help me out... plz!
query for backup and restore   (230 Views)
hello to all i want to know query for taking backup and restore in mysql and i m usingMySQL-Front . i want to know query.
Mysqldump from MySQL 5.5 then restore to 5.1   (204 Views)
I'm running vBulletin (forum software) on a Windows dedicated server. I recently had to upgrade the operating system to the latest version of Windows Server and in the process I also installed all the current versions of everything, including MySQL (and I restored the database from a mysqldump that was done before the upgrades). Well now there are some small issues with vBulletin, and vBulletin kinda recommends downgrading MySQL. So I'm going to use mysqldump to backup the current database, then I will simply uninstall MySQL 5.5 and then install 5.1, and restore the database from the dump file. Is it safe to do that I mean, is it safe to do the mysqldump from a later version of MySQL (in this case 5.5) and then restore it to an earlier version (in this case 5.1) Any guidance would be greatly appreciated!
Possible to restore databases from just the /data ???   (156 Views)
is it possible to restore databases from just the /data folder please tell me yes
AES_DECRYPT cant seem to show stored values   (233 Views)
Ok I have sucessfuly created a page that insterest data using the AES_ENCRYPT. Now I am working on another page that will show the data. I dont through any erros but I dont see the information either. I am using Mysql 5.0 and I use dreamweaver cs4. Here is the code a am using. [code] $query_Recordset1 = "SELECT AES_DECRYPT(password, 'text_key') AS decrypt FROM content"; $Recordset1 = mysql_query($query_Recordset1, $EevokePages) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); > Untitled Document [code] Can anyone help me out here I am stuck
AES_DECRYPT cant seem to show stored values   (221 Views)
Ok I have sucessfuly created a page that insterest data using the AES_ENCRYPT. Now I am working on another page that will show the data. I dont through any erros but I dont see the information either. I am using Mysql 5.0 and I use dreamweaver cs4. Here is the code a am using. [code] $query_Recordset1 = "SELECT AES_DECRYPT(password, 'text_key') AS decrypt FROM content"; $Recordset1 = mysql_query($query_Recordset1, $EevokePages) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); > Untitled Document [code] Can anyone help me out here I am stuck
Backup and restore with Innodb   (182 Views)
, I recently changed my database type from myisam to innodb on a few tables so I could use built in transaction support. For years, the backup and restore process has been to copy the 3 files belonging to the table in question to my local mysql install, extract whatever records and import the records into the production server. I've just learned yesterday that innodb doesn't use the 3 files for table, but instead stores everything into the ibdata1 file. When I copy the ibdata1 file from backup to my local mysql installation, I can't even start the mysql service. I have no way to correct a problem right now. My backups are literally useless. Any advice I suppose going forward I can setup and export from the mysql tables and copy those to backup, but that does not help me with the restore I need to perform yesterday.
Sum(qty), where & groupby cant get it to work?   (240 Views)
PHP Code: SELECTproductid,sum(qty) fromproductsizes groupby`productid` orderby2asc the above query works but what i want it to do is add where clause that says "where sum(qty) < 4 or sum(qty) = 0" but that gives me the error of invalid group function ----edit: got it working by using HAVING SELECT product.productid, name, sum( qty ) AS sum FROM productsizes, product WHERE productsizes.productid = product.productid GROUP BY `productid` HAVING sum( qty )
Best way to structure my database...   (268 Views)
there. I have a list of names and a list of files (they're video files). I'm going to give each person a password so that they can view the files that they are entitled to see/download. The number of files grows every day and it's a pretty big list. What's the best way to organise this The only way I would know how to do this would be to make a new 2-field table for each student (id, filename) and make a new entry in his/her table each time (s)he paid for a video. I'm sure that's not how you'd do that though. There must be a more efficient/simple way to do it.
restore command   (252 Views)
Hi , I am working on mysql database as backend of our application. I amcreating a sql backup database, to restore that database i need mysql command. Can anybody help me out... plz!
URGENT: how to restore only a SINGE Table from a MySQL backup   (213 Views)
, One of our new by mistake DELETED our main users Table. Oooooooh
cant create table ..... (erno: 150)   (228 Views)
Well morning everybody, so actually i have to do some work for my coming classtest, everything is working fine ... just the last part of my sql script. Code: CREATE DATABASE IF NOT EXISTS db_schueler; USE db_schueler; CREATE TABLE IF NOT EXISTS tbl_schueler ( id INT(4) NOT NULL AUTO_INCREMENT, name CHAR(12) NOT NULL, vorname CHAR(12) NOT NULL, adresse char(50) NOT NULL, stadt CHAR(20) NOT NULL, versetzung12 BIT NOT NULL, -- 1/0 bzw. Ja/Nein PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS tbl_fach ( fach_id INT(4) NOT NULL AUTO_INCREMENT, tbl_schueler_id INT(4), deutsch CHAR(12) NOT NULL, mathe CHAR(12) NOT NULL, englisch CHAR(12) NOT NULL, datenbank CHAR(12) NOT NULL, programmiertechnik CHAR(12) NOT NULL, betriebnetzwerke CHAR(12) NOT NULL, PRIMARY KEY (fach_id), FOREIGN KEY (tbl_schueler_id) REFERENCES tbl_schueler(id) ); CREATE TABLE IF NOT EXISTS tbl_zensuren ( zensuren_id INT(4) NOT NULL AUTO_INCREMENT, schueler_versetzung12 BIT NOT NULL, -- 1/0 bzw. Ja/Nein prfung BIT NOT NULL, -- 1/0 bzw. Ja/Nein PRIMARY KEY(zensuren_id), FOREIGN KEY(schueler_versetzung12) REFERENCES tbl_schueler(versetzung12) ); I am getting this Error Cant Create table 'db.schueler.tbl_zensuren' (erno: 150) I Found out that this error stays in connection with the foreign key, but i have no idea. I Hope s.o can help me to fix this. Grettings
Datetime values offsetting when restore from db dump?   (230 Views)
I have a pretty darn large database dump. I can see there are a few records in it with datetimes all around 15:00 in the afternoon: Code: (135312,302028,4,'2009-09-28 15:00:19','Jimmy'), (135313,302029,4,'2009-09-28 15:08:57','formosa'), (135314,302030,4,'2009-09-28 15:09:03','tammystrawn'); I have used the mysql command line to restore this dump into a clean database: Code: mysql -h domain.com -u user_name -p database_name < backup.sql When I look in the database after restoring from the dump, i see those records in the correct table, but the time values are different. They are 08:00:19, 08:08:57, and 08:09:03, respectively. Even more confusingly, I restored the same exact dump file on a different machine and got still different time values around 11:00. WHAT THE HECK What could possibly be causing these datetime values to be offset by several hours
changed hosts- not i get an error on db restore   (273 Views)
below is the first portion of my restore, where i am running into my first error Code: CREATE TABLE Authors ( ID int(11) NOT NULL auto_increment, LastEdit timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, Dear text, FirstName tinytext, MI tinytext, LastName tinytext, TaxID tinytext, Address text, Address2 text, City text, StateOrProvince tinytext, PostalCode tinytext, Country tinytext, CompanyName text, Phone tinytext, Extension tinytext, FaxNumber tinytext, Email text, ReferredBy text, Notes text, EntryDate date default NULL, JYANumber tinytext, ActiveEmail text, EmailEncrypt text, AuthorPassword tinytext, PRIMARY KEY (ID) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; i am getting ERROR 1064 at line 19: You have an error in your SQL syntax near 'CURRENT_TIMEST AMP on update CURRENT_TIMESTAMP, Dear text, FirstName tinyte' at line 3 can someone tell me wh i am getting an error with the timestamps on this update.i dont see a problem @ all
how to restore database   (185 Views)
I think i will have to da a full resortation of a database. lets assume old database is deleted. So I go to my hosting control panel and create a new mysql database Use same username and password as used in original open phpmyadmin and do to the new database and select import-then import the file that I have as a backup--i have a file that I exported as a text file-a full databse export. it is about 4 mb so I hope can do it at one time Is that basically how I can do it
Mysql restore db after accidentally reinstalling mysql.exe   (221 Views)
Using MySQL version 4.1.10a-nt. Using Windows XP Pro. For the last couple of years I've been using a MySQL database for a software application called "Gretag Macbeth." I was attempting to create a backup procedure for this database. On accident I installed the MySQL.exe again without really thinking that MySQL was already installed. When I went into Gretag to connect to my database the software basically said it could not find the database. When I went to c:\program files\mysql\mysql server 4.1\data I could still see a folder with the name of the database I was using. The folder has a bunch of *.frm files. So I attempted to do a Windows XP system restore from the day before. Still unable to connect to the database! So does anyone know why when I reinstalled MySQL on accident it could no longer connect to mysql database Is there any way I can restore my database Here is some data from the error logs: 100119 16:09:22 [ERROR] C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt.exe: Can't open file: 'information.ibd' (errno: 1) 100119 16:09:24 InnoDB error: Cannot find table toyocolormysql/information from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database