Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Restoring Select Databases/tables From An --all-databases Backup


I use the --all-databases switch to backup my entire database. Sometimes there's a need to restore individual databases or tables form the backup file. What command should I use for this?




View Complete Forum Thread with Replies

Related Forum Messages:
Restoring Mysql Databases Manually
have recently had to upgrade my sever from redhat9.3 to fedora core 4.0. Generally to back up a site I would sql dump the data base and ftp the site.. then rebuild latter..

but I didn't do it for one of the sites although I did ftp all the domains and all the mysql folders with the *.frm, *MYD .MYI.

could anyone shed some light on how I would reconnect the database to the site.. (i've tried just ftp the myqsl back to it previous location)

View Replies !
SELECT From Different Databases/servers Tables
I can't find the exact MySQL instructions to get data from tables located on a different database in the same engine and/or on different databases in different engines. I am working to a migration from Informix. In Informix a table name is defined as:

<tbl_name> (as usual)

or

<db_name>:<tbl_name> (same engine, different db)

or

<db_name>@<server>:<tbl_name>
(different engine, different db)

How can, if possible, replicate this syntax in MySQL ??

View Replies !
Backup My Databases
I made a question several days before to describe my strange trouble of
mysqldump. But I still can't figour it out. Well, I just want to ask
another question whether I could just backup my databases by copying
the data folder to some place? Then if I meet some disaster, could I
just copy the backup folder back to recover my databases?

View Replies !
Backup Databases
right now I have a couple of databases on my computer, and I need to back them up to a disc, but I dont know what commands to us. I have been googling for about 10 minutes and still havnt found anything.

View Replies !
Backup/Restore MySQL Databases.
Is it safe to say that restoring the [/usr/local/myql/data] directory from a
backup would that restore all database data and structure? All usr/pwd and
GRANT info?

View Replies !
How To Backup Databases When You Can't Reach The Server?
Ok, so since like 2 hours ago my local MySQL Server on my laptop won't start up anymore, when I boot the WinXP system I get a critical memory reading error from mysqld.exe and have to close it. And everytime I try to run the MySQL service, 5 secs later I get the error.

Now I want to backup the database, but can't since phpmyadmin can't reach the mysql server. Is there any other way I can backup the DB?

View Replies !
Restoring From Backup To New Database With Tally Tables
I've hit a bit of a snag with restoring from a mysql backup.

I've used mysqldump to make the backup:-
mysqldump --opt --skip-add-drop-table --no-create-info --complete-insert -uuser -ppass -hlocalhost databasename > ./sampledump.bak

I've got a new copy of the database that has all the tables created and some new data loaded into it.

Some of the tables act as tallies for pieces of data, such:-
ID (unique), totalamount

How can I restore from the backup so that these table rows are merged rather than replaced?

I.e backup has:-
user1 (ID), 1000 (totalamount)

View Replies !
How To Backup/restore To Move Databases From One Server To Another (Win2k3 Enterprise, Mysql)
I'm trying to move a "schema" (I guess thats the term) aka database from our webserver2 to our webserver3. I backup the .sql file, and move it over to webserver3. I tell it to restore that file and create the database if it does not exist. Part way thru i get all these errors like: Code:

View Replies !
Two Tables From Two Databases
I have two databases in mysql server. Say I have a table called 'table1' in database A and 'table2' in another database B. I want get two coloumns' data (colA1, colA2) of table1 into their corresponding coloumns (colB1,colB2) in table2. How would I go about doing this using sql query?

View Replies !
Databases/Tables
I was thinking, that trying to make a database/table and if it failed then it already existed but then i thought it might overwrite instead so i figured i would ask before i tried.

View Replies !
Select From Two Different Databases
i am trying to select 4 tables from two different database. but my query is giving me error, is there a way around where i can select from two different database in mysql query?

View Replies !
Combining Two Databases/tables
Im soon oging to be setting up a website which will host forums and auctioning software, the problem I have is that I dont want to have people having to register for each one. I would like it so that once they register they can use the same login name for each feature.

View Replies !
Join 2 Tables From Different Databases
I need to join 2 tables from different databases for creating one SELECT query and get data from both tables.
Mechanism LEFT JOIN don't allow to do this or may be I don't see it.
Can I join and if I can, how can I do this?

View Replies !
Joining Tables That Are In Different Databases
How do I join two table that are in two different databases? In MSSQL or Oracle, I would have done something like "SELECT * FROM db1..table1 t1, db2..table2 t2 WHERE t1.id = t2.id". Unless my memory failed me anyway. Is there an equivilant syntax for MySQL?

View Replies !
Views On Tables Of Different Databases
I have a table on database A1 and another table on database A2. These two databases are on different servers. Is there any possibility of creating VIEW on these two tables?

View Replies !
Many Databases With 1 Table Or 1 Database With Many Tables
I've to manage many 'table' (having same scheme) on the same server.

And I ask myself what could be the best to do (and if you know, why) :

Creating as many database (the name would be a 8byte int value
(converted to a string)) as necessary, all with the same table struct
(and table name), or create 1 database and in it create also as many
table as necessary (so also a 8byte int value as name) ?

Has mysql some limitations on that (database/table) and what about the
performance issue ?

View Replies !
Phpmyadmin :: Tables And Databases Not Showing Up
I have a webserver running the latest stable apache/php/mysql, i tried to install a mail client (dovecot) but it installed mysql along with it. I reinstalled the mysql I had before and found that a bunch of tables needed repairing (had not been closed).

Now the problem is an odd one, all my sites work fine, but phpmyadmin says there are no databases. The dropdown still has a list of databases though. If I select one then it says there are no tables. I can run the query "Show Tables" and it lists the tables as a result (so it can see them).

View Replies !
Searching Multiple Databases And Tables
I have about 8,000 tables spread across 26 databases because my webhost won't allow me to use more then 100Megs per database.

Each table name is a unique account name. Inside the table the fields I am interested in are date and dollar.

I have a text file with all 26-databases, and another text document with all 8,000+ accounts. I am looking for who the top outstanding dollar accounts are for a particular day.

I currently use php to open up the account.txt file, and the database.txt files. I take the first account entry and connect to each database until I find the database with the account table. Once I find it, I run the below query and insert the dollar, date, and table name into an array, then move on to the next account name. Once I have them all, I sort the array and can now spit out the top 20 outstanding dollar for that day.

Is there a way I can search a full database without specifying table name? Or is there any way I can make this no so kludgie?

Code:

select date, dollar from `AMEC1542` WHERE DATE(date) = '2008-12-05' ORDER BY 'dollar' LIMIT 2;

View Replies !
Updating Tables From Different Databases & Computers On Lan
I want to update /insert data in one table of one database from another table in another databes. Both databases are Mysql but reside in different computer on LAN. Is this possible in MYSQL. If yes, can someone pl give the syntax. I am using VB6 , ADO ( with connection string for connecting to MYSQL)

View Replies !
Can Connect And List Databases But Not Tables
I have two mysql servers (Centos 4, MySQL 4.1.20-log) and I need to perform admin from a remote server.

I've added in both servers a user with all privileges

GRANT ALL PRIVILEGES ON *.* TO 'user'@'phpmyadminserver' IDENTIFIED BY PASSWORD 'XXXXXXXXXXX'

In the first one I can connect and list databases and tables. In the second one I can only connect and list the databases. A show tables command shows me :

show tables;
Empty set (0.01 sec)

Any ideas?

View Replies !
Syncronize 2 Tables From 2 Different Databases Using A Cron Job
I want to set up a cronjob to syncronize 2 tables (only) from one database to another. The databases have the same content and reside on the same MySQL server. I want this because I have 2 websites using the same dontent from this table and I don't want them to use the same database, I prefer them to use different databases. The server is Ubuntu 8.04, if it matters, it has apache2 and php5. MySQL is also 5. I'd apreciate any help you can give me, I didn't get much from the Ubuntu forum, regarding this thing, and I hope I'll find more support here.

BTW, since I'm really a noob, please post an example easy to understand rather then the explanation of the entire process :). Let's just call, for this example, the datababes DB1 and DB2 and the tables TB1 and TB2

View Replies !
How Can I Find Difference In 2 Tables In Different Databases With Same Structure
I am developing an application in VB.net 2005 that synchronizes two mysql databases of same structure. I have done most of the work but having problem in finding the difference in records in 2 tables. Let me explain the scenario

There is a table in the local database having name "user". The same table exists in the online version of the database. I want to find the difference of records in the 2 tables so that i can delete surplus users from the online version of the database. I am trying something like this, which is not working ....

View Replies !
Multiple Tables Versus Mutiple Databases
In a setting of a web based application (typical LAMP installation) where multiple web users may be logging into the app and accessing data for one of numerous subgroups, each of which requires about 30 tables to run the application, which design will perform better:
A) a single database with a set of identically structured tables for each subgroup differentiated by table name or

B) a database for each subgroup, each with the same table scheme.

In either case the two tables any individual web user will most commonly be accessing for their group have ten's of thousands of records, the remaining 28 or so required tables being much smaller (less than 100 records) and having group specific variables and data to control the application. In all cases the web application interface uses the same php code with the group identifier declared at login which selects either the table subset or group specific db.

In case my question isn't clear scenario A would have a single database with a master table that controls the group numbers by an id, say 1 to 20 and then a set of 30 tables for each like (users_1, data_1, ...), (users_2, data_2, ...),...,(users_20, data_20,...). In this case the single database would have in excess of 600 tables.

Scenario B would have a master database with a table to store individual group id's and each group id would have a database with a name based on their id like db_1, db_2,...db_20. Within any db_* there would be identically structured tables user, data, ... . In this case there would be 20 databases each with only 30 tables plus the master control db.

View Replies !
How To List All Databases And Tables In A Remote Mysql Server?
I want to list all databases and every table's name in each database , Mysql server is 4.0.10 or later.

I need to use a scipt to do it , but from which table in MySQL server can I get the infomation I need? or How to write the script?

View Replies !
100 Databases, 4 Tables Each, Or 1 Database, 400 Tables
I was able to build, tweak and do whatever necessary to establish a rather different project but am worried that it may sooner or later crash due to idiotic programming / database usage.

In essense I took 1 database with 4 tables and duplicate it 100 times BUT because I need to connect to the different tables within the php script and am not experienced enough to created nested database connections, I duplicate the 400 tables within the same database.

What I want to know from a MySql perspective, would it make any difference if the script "play around" with 1 database connection and 400 tables or would 100 databases with 4 tables each be better? (Maximum database queries to only 17 tables at a time)

View Replies !
Restoring A Backup
i have an application running on it. Several days ago the server has crashed. And i had an backup of 2 months old. After the restore the application is working again. But my provider has a newer backup of 2 days before the crash. So he have send me this backup.

It contains 3 file's.
*.frm, *.myd and *.myi.

How can i get these file's in to my database.

View Replies !
Restoring Tar.gz Backup
I backed up my subdreamer & vbulletin database. They were in tar.gz.

Now i cannot restore any of these backups in cPanel nor phpmyadmin. I do know that it usually is in a .sql, .zip, .gz but when i open the tar.gz file i see these MYD and frm etc files. None of them are in sql and when i try to upload the tar.gz file it gives me this sort of error:

[first 6 lines]
----BEGIN CUT----
eNrtfQ10XMV59tz936s9smQbMCDgcnBimSzy/q8kH45lbBkBNgjbYAMBfLV7pb1o/9i9a0mEJAqh
YAhtTEvP8Wn5UueEr3UITd2WJm5LHKdxWqclrdPQxs3nJE7Cl7gNbZ2UJP4al/3ed2buz64kSwJb
ATOv/Wjmzp2fd96Zeefn3ndv/+bNt23uVdZFlXUxZWP/rb1KTIkr0Wi6J52St2yFW0SW1925pVdZ
flO2V6k+mC+rlapW6crrQ13lXDm8U4l1JSNdsa6oEotEUqsi3auiKSWa7k1EeyPdSl4r9Cj942Vl
ubxpYsvtG3uVRFe0Kxa9rmqoxaxaycp3bNms3LYlrKy9sf/WrWHlzn4oc5teVG7qV1JdEXlw01rg
[end first 6 lines]

and i don't feel like uploading (don't know if it's even possible) the 141 myi and MYD etc files seperately. Does anyone know how to restore my backup?

View Replies !
Restoring From A Backup
I used MySQL Admin to backup a database, then dropped the database and used the Admin again to restore as a test. The database had some tables that contained encrypted data that was encrypted with AES_ENCRYPT. When I restored the database, I was unable to access the encrypted data with AES_DECRYPT. Is there something I'm doing wrong, or maybe a way around this?

View Replies !
Restoring Backup
My host screwd up and deleted my My_SQL files. fortunately I had just made a back up. I have since then switched hosts and need to get my database back up, but whenever I try uploading it with php my admin I get a timeout problem. I need to get the database up within 2 days but can't figure out any way to do it.

View Replies !
Restoring A Backup Doesn't Work With Procedures
I'm a little nervous that when I restore a backup it doesn't list any of the procedures I have in my schema. Is this normal? If so, how do you restore procedures? Do I need to look at another tool?

Actually, as I'm looking at the data directory I don't see anything that looks like my procedures. Where are they stored? All I have in my data directory are *.frm and *.opt files.

View Replies !
Restoring A Backup To An Older Version Of Mysql
I've been playing around with the XOOPs framework that uses a mysql backend and I wanted to restore a backup from my machine to my webhosts server but they run an older version, when I try and restore the back up I get...

ERROR 1064 (00000) at line 21: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCK TABLES `xoops_ams_article` WRITE' at line 29

I'm guessing its cause its and older version, is there away to get around this or am I stuck until they upgrade their servers?

View Replies !
Updating And Then Restoring Backup From Remote Server
I have backed up a mysql db on a remote server (PHPBB) and want to delete some entries from it and then restore it. The file is .sql.

what is the best way to do this - i am a bit lost - there is some strange bug happening on the message board and i think this is the only way to correct it for now.

View Replies !
Separate Databases Vs Separate Tables
I have a question regarding setting up MYSQL. I'm a old dBASE programmer from the 1980's. I know about relational database work.
What I want to know is what are the advantages and disadvantages in setting up MYSQL in one database with many tables vs separate databases with a few tables in each database.
It would seem more advantageous to work with all the tables in one database.

View Replies !
Multiple Databases Or Multiple Tables
I have an application that is supposed to make multiple connections [around 10 connections per second] to a mysql database. The connections are done by mutlitple users at potentially the same time.

I have to decide if I should use :

1)one database with one table for all users.
2)one database for each user.
3)one database with one table for each user.

I would really appreciate if you can tell me what choice is best and why.

View Replies !
Cant See My Databases
I don't know what the problem is here. I used to be able to install MySQL and go to this interface (please see attachment). Right-click and 'create datbase' but it doesnt let me do that. The only options it gives me is flush hosts; flush logs; flush tables and flush threads.

View Replies !
Databases
I have a small residential design company and would like to create an online database so that I can start selling my plans online. I downloaded mysql a couple of months ago and played with it a little bit and even created a small database so that I could see what it could do.

But how would I go about getting a database that people could do searches on with my website? Or is there another interface that I need to install ontop of mysql that will allow me to do this easiely?

View Replies !
Different Databases
I am developing an application that uses two separate databases. Each database is hosted by our ISP on a different IP address. I would like to write a query of the form:

SELECT * FROM table WHERE db1_tbl.val = db2_tbl.val

where db1 and db2 are my two independent databases.
I write in ASP and I have a connection string to each database. What I need to do is select records from one database with a column containing values from the other. My current method, in code, is to open each recordset in turn, convert to an array and then do a look up from one to the other, which in code is complicated. Is there any way I can do it through a query?

View Replies !
A Doesn't Get All Databases
I have an odd mysql configuration. Suffice to say that I have over 6000 databases (small ones, all automatically created).
When I run mysqldump -A, it appears that it's only getting a subset of the 6000. It's only backing up 1175 databases.

View Replies !
Use Two Databases
Use two Databases for authentication
I would like to use two databases to authenticate users.
The first database I would like to be checking usernames and passwords only and usernames in plain text and passwords to be in md5.
The second database with the rest of the data the users need for privileges of the application that has to be in plain text.
HOW? I have all the create scripts written but don’t know how to link the databases properly.

View Replies !
Where Are The Databases?
After having installed MySQL on a Windows machine, SHOW DATABASES shows test and information_schema. Yet, I see no files of these names anywhere in the MySQL directories. I'm curious about where it keeps them. More importantly, where do I put my own databases so I can access them in MySQL?

View Replies !
Each Set Of Databases
I would like to set up separate data directories and have mysql store data in those subdirectories. Each client would get their own directory. They would each contain the following databases: gl, 2004gl, 2003gl, ap, 2004ap, 2003ap, etc. I like to separate the database files for speed which was required when using MSAccess.Can this be done, or must I either wait for 5.0.2's schemas or redesign my database structure? I am using mysql 5.0.0 right now, but am only in the development phase, so I will upgrade asap before going into production mode.

View Replies !
How Many Databases Should I Use?
What do you think that would be better? To have 20 databases with 10 tables each database and a total of 2.000 rows in each database, or... To have 1 database with 11 tables and a total of 40.000 rows. How should I handle large projects?

View Replies !
How Many Databases Do I Need
I'm in the preparation stage at the moment of a really big project, now the project is going to entail people signing up to a website and then selling stuff online. We are looking at about 1000 people signing up to start and then growing to about 8000.

The question I have is how many database's should I build the site around as there is going to be a "Super Admin" section where I will add all the products available on the site (about 15,000) and manage ad's and stuff like that.

Then the person that pays to have an online shop will select products from the ones i have inputted and be able to change all his settings for his personal look to the site.

Then there is the end-user who will come to the site sign up and then buy stuff, and his settings will need saving as well.

So as far as performance goes would it be better to have a separate DB for each section ("Super Admin" - "User Admin" - "End User") or just use one and store everything in there?


View Replies !
Why Do Databases Goes Bad?
How often do databases go bad, and what is the usual cause? I've had flat file sites for 5 years that never had a problem, I've never had a problem with a MySQL based CMS thus far but I have with forum software and didn't know the cause.

I hear of websites losing all their data from their MySQL database going bad. Is the solution to make a MySQL backup dump every so often?

View Replies !
Databases With Different Encodings
when I try to feed the dump into my server (mysql < DUMPFILE) as it is,
I see the greek but I can't get the sorting correct. When I change the
dump file (CREATE DATABASE ... CHARACTER SET greek) I cannot see the
greek text.

Furthermore, when I try to get the texts from a php page, I can't get it
right either way. Any ideas?

Also, is there a way to set the database encoding to something else than
the default in php? I see there' s a "mysql_client_encoding" function,
but no function like "set_mysql_client_encoding".

And another thing. I get the utf8-encoded greek correct on php pages
when I build php with "--with-mysql", which uses Client API version
3.23.49. If I build it with "--with-mysql=/usr/local/mysql" (where I
have installed MySQL 4.1.5) yielding Client API version "4.1.5-gamma" in
phpinfo(), I also get the greek text wrong (every character shows as
"?"). Is there something I should configure at the Client API, and how
do I do that?

View Replies !
Show Databases
I just installed MySQL on my home PC and I tested out the
show databases query, and it lists two:

information_schema
bbdatabank

The second one is one I created myself, but I don't understand what the
first one is. It is not listed in my 'data' folder, but mysql and test
*are*, yet they aren't listed when I type the show command. Why is that?
How can I get them listed so that I can use them, and what is the
information_schema?

View Replies !
Large Databases
We are in the process of building an application to front end a
database of about 2 million records. I would like to know if MYSQL can
handle this and if not, what would be a good database to go with. We
would like to use opensource as much as possible, but if MYSQL cannot
handle this kind of volume then we will have to go in for commercial
software.

View Replies !
Unable To ADD Databases
I'm just started the process of learning MySQL and databases in general.
I just bought the book 'MySQL' written by Paul DuBois, who I gather is
really active in this community.

Anyhow.. Here's the problem that I'm having.

mysql> GRANT ALL ON sampdb.* TO 'sampadm'@'localhost' IDENTIFIED BY
'secret';
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+----------+
| Database |
+----------+
| helpdesk |
| mysql |
| test |
+----------+
3 rows in set (0.01 sec)

Anyone notice the problem? Even though I get no error.. the sampdb is
not being greated. This is weird as I've been able to use this exact
command in the past with no problems. I even tried logging in as root
before starting the mysql client, still made no difference.

View Replies !
Linking Databases
is it possible to link databases within mysql? I have a access = database that I need to import into mysql this db consists of 4 other = dbs linked together sharing a common switchboard. Can I link the tables = in one db to tables in another db?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved