Gossamer Forum
Home : Products : Gossamer Links : Discussions :

MySQL problem

(Page 1 of 2)
> >
Quote Reply
MySQL problem
When accessing into Links SQL I recieve this error
A fatal error has occured:

Code:
Can't call method "fetchrow_hashref" on an undefined value at (eval 5) line 15.

Please enable debugging in setup for more details.


I recieved this normally when the mysql server was down but I checked that the server is up. When I login into the admin and try to recreate the tables via the SQL server setup (first option) I get errors like this:

Code:
Creating Users table ... failed (Failed to execute query: '
CREATE TABLE lsql_Users (
Username CHAR(50) NOT NULL,
Password CHAR(25) BINARY NOT NULL,
Email CHAR(75) NOT NULL,
Name CHAR(75),
Validation CHAR(20),
Status ENUM('Not Validated','Registered','Administrator') DEFAULT 'Registered' NOT NULL,
ReceiveMail ENUM('No','Yes') DEFAULT 'Yes' NOT NULL,
Newsletter ENUM('No','Yes') DEFAULT 'Yes' NOT NULL,
INDEX emailndx (Email),
PRIMARY KEY (Username)
)
' Reason: Can't create/write to file './isaacdir/lsql_Users.frm' (Errcode: 13))

Please help!
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
[root@paul /root]# perror 13
Error code 13: Permission denied

Your .frm files are pooped, I think you'll need to email your host.
Quote Reply
Re: [Paul] MySQL problem In reply to
I am the host Tongue
I own a dedicated server in a lab.
What shall I do? I got this error after a fix of a permission problem in MySQL
I executed
sudo chown mysql /var/mysql
sudo rm -f /var/mysql/mydomain.com.err
sudo rm -f /tmp/mysql.sock
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Edited to stop anyone else trying it :)

Last edited by:

Paul: Sep 9, 2002, 4:28 AM
Quote Reply
Re: [Paul] MySQL problem In reply to
OK
Now LinksSQL doesn't find the database. If I use MySQL man is the same thing..... Unsure
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
How do you mean?
Quote Reply
Re: [Paul] MySQL problem In reply to
It gives unknow database name 'isaacdir'
If I use MySQLman to list all databases it stucks....
If I try to type mysqladmin -u mysql -pmypass create isaacdir

mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'isaacdir'. (errno: 13)'
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Hmm thats still permission denied.

What are the directory permissions of /var/mysql ?

From shell....

cd /var
ls -Alh

Mine is :

drwxr-xr-x 40 mysql mysql 4.0k Sep 1 00:02 mysql
Quote Reply
Re: [Paul] MySQL problem In reply to
If I use
ls -Alh
I get
ls: illegal option -- h
usage: ls [-1ACFLRSTWacdfgiklnoqrstux] [file ...]
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Try without the h then :)

On my copy:

-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)

...but it doesn't matter if you don't have that option.
Quote Reply
Re: [Paul] MySQL problem In reply to
For mysql I get
drwxrwx--- 9 mysql mysql 306 Sep 9 12:16 mysql
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
What about:

ls -Al for the /var/mysql directory?

eg...

cd /var/mysql
ls -Al

Last edited by:

Paul: Sep 9, 2002, 3:36 AM
Quote Reply
Re: [Paul] MySQL problem In reply to
I don't have this dir
My mysql is at /usr/bin/mysql
In the var I have just the mysql dir
If I type cd /var/mysql I get permission denied. The sudo doesn't work.... Frown
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Are you logged in as root?

Make sure you are root then type

cd /var/mysql

...you shouldn't get permission denied.
Quote Reply
Re: [Paul] MySQL problem In reply to
You're right Tongue

drwx------ 2 mysql mysql 68 Sep 6 09:19 adcycle
drwx------ 95 mysql mysql 3230 Sep 6 09:19 gforum
drwx------ 47 mysql mysql 1598 Sep 6 09:22 isaacdir
-rw-r--r-- 1 mysql mysql 850 Sep 9 12:17 mydomain.com.err
-rw-rw---- 1 mysql mysql 4 Sep 6 18:52 mydomain.com.pid
drwxrwx--- 20 mysql admin 680 Sep 9 12:16 mysql
drwx------ 2 mysql mysql 68 Sep 6 15:18 test
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Ok they look ok....finally can you cd into the database you are using for links sql and do another ls -Al
Quote Reply
Re: [Paul] MySQL problem In reply to
I get
Code:
total 872
-rw-rw---- 1 mysql mysql 1917 Sep 6 11:07 lsql_CatLinks.MYD
-rw-rw---- 1 mysql mysql 7168 Sep 6 11:07 lsql_CatLinks.MYI
-rw-rw---- 1 mysql mysql 8594 Sep 6 09:22 lsql_CatLinks.frm
-rw-rw---- 1 mysql mysql 460 Sep 6 11:07 lsql_CatRelations.MYD
-rw-rw---- 1 mysql mysql 2048 Sep 6 11:07 lsql_CatRelations.MYI
-rw-rw---- 1 mysql mysql 8640 Sep 6 09:22 lsql_CatRelations.frm
-rw-rw---- 1 mysql mysql 6868 Sep 6 11:08 lsql_Category.MYD
-rw-rw---- 1 mysql mysql 7168 Sep 6 11:08 lsql_Category.MYI
-rw-rw---- 1 mysql mysql 9091 Sep 6 09:22 lsql_Category.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_Changes.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 09:22 lsql_Changes.MYI
-rw-rw---- 1 mysql mysql 8658 Sep 6 09:22 lsql_Changes.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_ClickTrack.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_ClickTrack.MYI
-rw-rw---- 1 mysql mysql 8693 Sep 6 09:22 lsql_ClickTrack.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_Editors.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_Editors.MYI
-rw-rw---- 1 mysql mysql 9035 Sep 6 09:22 lsql_Editors.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_EmailMailings.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_EmailMailings.MYI
-rw-rw---- 1 mysql mysql 8658 Sep 6 09:22 lsql_EmailMailings.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_EmailTemplates.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_EmailTemplates.MYI
-rw-rw---- 1 mysql mysql 8776 Sep 6 09:22 lsql_EmailTemplates.frm
-rw-rw---- 1 mysql mysql 66700 Sep 6 11:07 lsql_Links.MYD
-rw-rw---- 1 mysql mysql 33792 Sep 6 11:08 lsql_Links.MYI
-rw-rw---- 1 mysql mysql 9135 Sep 6 09:22 lsql_Links.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_MailingIndex.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_MailingIndex.MYI
-rw-rw---- 1 mysql mysql 8780 Sep 6 09:22 lsql_MailingIndex.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_MailingList.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_MailingList.MYI
-rw-rw---- 1 mysql mysql 8576 Sep 6 09:22 lsql_MailingList.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_MailingListIndex.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_MailingListIndex.MYI
-rw-rw---- 1 mysql mysql 8652 Sep 6 09:22 lsql_MailingListIndex.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_Reviews.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 09:22 lsql_Reviews.MYI
-rw-rw---- 1 mysql mysql 9117 Sep 6 09:22 lsql_Reviews.frm
-rw-rw---- 1 mysql mysql 55278 Sep 6 11:07 lsql_Users.MYD
-rw-rw---- 1 mysql mysql 17408 Sep 6 11:07 lsql_Users.MYI
-rw-rw---- 1 mysql mysql 8832 Sep 6 09:22 lsql_Users.frm
-rw-rw---- 1 mysql mysql 0 Sep 6 09:22 lsql_Verify.MYD
-rw-rw---- 1 mysql mysql 1024 Sep 6 11:07 lsql_Verify.MYI
-rw-rw---- 1 mysql mysql 8626 Sep 6 09:22 lsql_Verify.frm
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Hm they look fine too.

I must be missing something.

Just as a test see if it works after doing:

chmod 0777 /var/mysql
Quote Reply
Re: [Paul] MySQL problem In reply to
nope Crazy
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
Blech.

Have you tried restarting mysql?

Also check the .err file to see if there is anything in there.

Last edited by:

Paul: Sep 9, 2002, 4:05 AM
Quote Reply
Re: [Paul] MySQL problem In reply to
OK I restarted mysql and now MySQL man can view the database.
But when I reload the tables into LinksSQL I get that the user mysql can't access using password Yes.
But I've set the password for this because a week ago all gone normally. Now if I type
GRANT ALL PRIVILEGES ON *.* TO mysql@localhost IDENTIFIED BY 'mypass';
I get
ERROR 1146: Table 'mysql.user' doesn't exist
Max
The one with Mac OS X Server 10.4 :)

Last edited by:

maxpico: Sep 9, 2002, 4:22 AM
Quote Reply
Re: [maxpico] MySQL problem In reply to
Uh oh...it looks like your mysql table is a bit messed up.

Do you still have the mysql_install_db file?....if so I'd delete /var/mysql/mysql and /var/mysql/test and then re-run it and it will reset your mysql database and you can then re-create your users.

Be careful though :)

Last edited by:

Paul: Sep 9, 2002, 4:24 AM
Quote Reply
Re: [Paul] MySQL problem In reply to
No...
I can't do it in another way?
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] MySQL problem In reply to
I can't think of any other way if it is saying your mysql database is corrupt.

http://supportsql.com/mysql_install_db
Quote Reply
Re: [Paul] MySQL problem In reply to
Great!!
I've done it trough the MySQL utility app that comes with Mac OS X Server 10.2
Thanks a lot Paul for all the assistance Wink
Max
The one with Mac OS X Server 10.4 :)
> >