How do I register an mysql database? -
Sorry for a noob question about MySQL I've downloaded to learn about mysql but I know this Do not think how to register it with your local host ISQL DB. I know in MS SQL that you can register any SQL DB using SQL Studio. I tried Google but there were no results. Perhaps, my search phrase is incorrect. I'm searching with "how to register a mysql database, register mysql database ... etc ..." How can you register or setup flight database from existing database? Am I using DBVisualizer? Is there a way in debugis that I do not know how to regulate a database?
Thanks
EDIT: Sorry for the bad words. I found . I have .myd, .myi and .frm and I want to get it to be restored with my local mysql example? I see all the answers, but I am still confused how do you restore the database from those 3 files.
A small background first. The linked FlatStats download page, in the original question, appears to provide zipped torballs of binary table storage files from MySQL data directories. Given that this distribution is considered to be a viable means, and combined with the use of merge tables, I suspect that this group of tarball MyISAM data files ( .myi
, included .myd
). Jake edited confirmed that this is the situation.
It is not unusual at all, however, when MyISAM is an abnormal means of distributing a MySQL data set to back up storage, and is probably not unheard of to run large data; This probably works much more space-efficiently than a similar dump file. Of course, attaching database files in an example, in SQL Server Land, is very common.
Speaking broadly, you can recover the database in this way:
- Find MySQL Data Directory; Usually
/ var / mysql
or similar - create a new directory with the desired database name eg
flightdata
- Remove
.myi
,.myd
and other files from this template in this directory- Make sure that the user of the entire directory is owned by MySQL (usually
mysql
) -chmod -R
make sure that you get everything- Open a MySQL console
- Use
& lt; Database Name & gt;
Show Tables
- Remove
You must list some tables. In addition, downloadable download pages include some scripts SQL, which have SQL commands that you need to run against your database. These merge definitions and table indexes will be rebuilt. You can pipe this command line in the client, e.g. mysql -u & lt; Username & gt; -p & LT; Password & gt; & Lt; Database Name & gt; & Lt; & Lt; Sql-file & gt;
.
The MySQL server may be a good idea to shut down when you are doing this; For example, use /etc/init.d/mysql stop
or similar, and restart the file when removed.
Comments
Post a Comment