Import database with .frm and .ibd directly from the folders - mysql

hi I have my database with the different folder in .frm and .ibd, I inserted this documents into current database folder that it is in var/lib/mysql/current_database the thing or the issue is that if I go to phpmyadmin and then I refresh to see if that new tables that I added before where uploaded, they will not display at all.
and this new table that I added is in same path where visible tables in phpmyadmin are.. example:
I can see users table but If I add rols table I do not see it even if it is same path so I wonder what can I do to fix it? what do I need to do to see in phpmyadmin or mysql database that new table that I added in var/lib/mysql/current_database
Thanks

Related

MS Access Linked Table Not Updating New Fields

I have a MS Access Database which has a Linked Table called "Combined" that is from a text file. I have added a new field to the Txt File but this new field is not showing in the Access Table "Combined". I have right-clicked on the "Combined" table in Access and opened up the Linked Table Manager and refreshed the link and it is still not showing. When I go through the process of Linking the Data Source(.txt file) to a new table "Combined2" it shows the new field. I am not sure what I can do to remedy this. I have tried to just create a new linked file and overwrite the table name "Combined" with the linked file but then it makes it so my queries no longer function that were linked to the "Combined" table. Any help would be appreciated.
Drop linked table in Access and create it again. Just refreshing the link in linked tables manager is not enough in case of text files because it creates import specification, which is specific for file format.

How To Restore the records in mysql table which was deleted unfortunately

I deleted records in a MySQL table two days ago. Can you please help me to get back these records. I don't know how to repair the MySDL table.
Please help me to get back the deleted data and mention some way to create a backup for my MySQL database.
There's no "magical" way to restore deleted data, so :
To create a backup, you simply have to export the whole database in a file. This can be done easily with any database manager. Here is how to do it with PHPMyAdmin :
Click on your database (left pane)
Click on Export (top of the page)
Click on Go for a quick and full export
Keep the generated file in a safe place (ie. not in your website folder)

MySQL "source" command overwrites table

I have a MySQL Server which has one database called "Backup".
It only has one table with the name "storage".
In the Backup db the storage table contains about 5 Millions datarows.
Now I wanted to append new rows to the table by using the "source" command in the SQL command line.
So what happend is, that source uploaded all the new files in the table, but it overwrote the existing entries (seems that he first deleted all data)
What I have to say is that the sql file that I want to update comes from another server where this table has the same name and structure as "storage".
What I want is to append the new entries that are in the sql file to the one in my datebase. I do not want to overwrite them.
The structure in the two tables is exactly the same. I use the Backup datebase as the name says for backup uses, so that from time to time I can backup my data.
Has anyone an idea how to solve this?
Look in the .sql file you're reading with the SOURCE command, and remove the DROP TABLE and CREATE TABLE statements that appear there. They are the cause of your table being overwritten; what's actually happening is that the table is being replaced.
You could also look into using SELECT ... INTO OUTFILE and LOAD DATA INFILE as a faster and less potentially destructive way to get data from one server to the other in a file.

mysql table is not displaying

I have one database name - manaskavya. In this database I had created 10 table with xampp server. Due to some reason i installed Wamp server in that it was showing only 9 table, It misses one table name 'manas_likes'. Then I again installed the Xampp server but the missing table is not displaying, and when i am creating the new table with same name its, showing table exists, and when I am trying to drop it,repair it or truncate it, its showing table not exists.
I don't know why its happening , if you know please help me out.
Thank you
Once i faced the same problem. I tried Change table name in the create table query, exequte it and then rename the table. Then drop the table and recreate it.
After checking all these details I got some thing, I am right or wrong don't know but it worked for me..
1. When we create new table in database, its create one file with .frm extension
you can check this file in C:\xampp\mysql\data\database_name\anytable.frm
for wamp C:\xampp\bin\mysql\mysql5.0.2\data\database_name\anytable.frm .
2. After inserting data in this particular table it creates two more files with extension
.MYD and .MYI .
3.when we create the backup of the particular database..
If you are making backup with phpmyadmin then such type of problem will never be happen.
if you are making backup directly from folder means C:\xampp\mysql\data\database_name then some time it misses the .MYD and .MYI extensions files
4. After importing again in database there would be only .frm extension file, Due to absence of .MYD and .MYI extension file it becomes invisible. and it also won't allow you to create new table with same name because .frm extension file is already present in your database.
5. So in such type of case go to directly at folder position and delete that specific .frm extension file (Please be sure to delete the correct file).
6. Then after you will be able to create the table with same name.

Why does the MySQL file that contains my table's data not change size when I add data to the table?

The files in which MySQL stores the table data don't seem to grow when I add data to the tables. They seem to start at 9k and stay there.
The context of this question is that I wanted to create a database on my fastest drive (which is not the drive on which MySQL is installed). I worked out how to do this by setting the datadir variable and this seems to have worked: when I create a new database I see a folder named for the database in datadir, and when I create a table in that database then the folder gets a new file called table.frm.
Is the .frm file not where MySQL stores the table's data? If 'no', then where is the data being stored? If 'yes' then why doesn't the file grow in size when I add millions of records to the table?
the .frm is the table definition file, look for the .myd (data) and .myi (indexes) files