Mysql 4 database folders

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Mysql 4 database folders

Post by mhouldridge »

Hi,

I have just installed mysql version 4 and have created my database and tables within navicat.

The database folder, named kp shows the users.frm and homes.frm but there is no myd myi files....

I cant do anthing on the site because i get the error,

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in E:\Websites\KingstonProperty\user_registration2.php on line 351

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in E:\Websites\KingstonProperty\user_registration2.php on line 352
Can't open file: 'users.InnoDB'. (errno: 1)
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

You will not have any myd or myi files if you are using INNODB tables instead of MYISAM tables.

InnoDB table data is stored in the ibdata files located in the mysql directory and not the directories named for the databases. And from that one error and the fact you only have frm files in the directories it looks like you may be using InnoDB databases.

After you connect to the data base you might want to add this line...

Code: Select all

echo mysql_error ();


...to see what error is returned when you try to connect. It doesn't look like you are connecting to the database. You may not have upgraded or installed EVERYTHING that was needed when you installed Mysql4.

Or you deleted the ibdata files or didn't copy them over if you moved the databases to a different directory or server.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

also, echo out your SQL statment and run it through phpMyAdmin, it normally gives some pretty good error messages.
Post Reply