Page 1 of 1

phpmyadmin not seeing all frms

PostPosted: 14. June 2013 03:39
by generalp2
I set up xampp on both my desktop and notebook. After developing a number of programs on my desktop, when copied over the php code and mysql directories to my notebook so I could work on it on a trip, the code moved fine but the mysql tables seem to be invisible to phpmyadmin. Phpmyadmin doesn't seem to have a way to point it to a specific directory but I was able to copy the frm's into the directory it was looking at but it still doesn't see the tables. I even created a new table in phpmyadmin and, lo and behold, that table showed up in the same directory with the other frms but phpmyadmin only lists the one I created and none of the others. What don't I know about how to connect up phpadmin with my existing frm's?

Re: phpmyadmin not seeing all frms

PostPosted: 14. June 2013 04:20
by hackattack142
Hello,

phpMyAdmin is only a frontend interface to MySQL. If you are trying to copy DB tables, they need to be added to MySQL data folder. I don't know if you are copying everything you need to or not.

That said, I would not suggest copying the raw files. It would be better to export them to an SQL file with phpMyAdmin on your desktop and import them via phpMyAdmin on your notebook.

Re: phpmyadmin not seeing all frms

PostPosted: 15. June 2013 02:10
by generalp2
Thanks for your thoughts. I did copy them into the mysql/data folder and was able to create a new table in the same folder that looks the same as the tables I copied there but only the one I just created show up. As far as export and import, it is too late for me to try that as I am already away from my desktop. Is there a way to use mysql to connect and/or show those tables (other than from within php)?

Re: phpmyadmin not seeing all frms

PostPosted: 15. June 2013 02:30
by generalp2
Can you tell me what db.opt does?

Re: phpmyadmin not seeing all frms

PostPosted: 15. June 2013 03:11
by hackattack142
Hello,

You can connect to the MySQL server via command line (use the mysql.exe program in your /xampp/mysql/bin).

The db.opt file is just for various database options (like characterset and collation). You did not mention any .MYD (Table Database) or .MYI (Table Index) files. Were all your table empty? If not and you do not have those files, you did not bring your actual data with you.

Assuming you are using MyISAM instead of InnoDB, it looks like it should be fairly straightforward to do the copy.

People generally do the following:
1. Stop the MySQL server
2. Copy the database folders (includes .frm, .opt, .myi, .myd files and all other files that might be in that database folder) you want from the first mysql data folder to the target mysql data folder
3. Restart the MySQL server

You may also need to try to issue a 'create database' with the database names you are copying to get them to show up. You may also need to recreate users/permissions on those databases/tables.