LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-28-2003, 01:39 PM   #1
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Rep: Reputation: 31
I can't get MySQL to start.


I've gotten MySQL installed on my Playstation 2. Now I'm trying to get it started. The Manual entry on Post-installation setup (section 2.4) says to run ./scripts/mysql_install_db . When I do that, it gives me about a thouand "ERROR: 1146: Table 'mysql.<something>' doesn't exist" errors.

The error message after that is:
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!
<how to do that>

You can start the MySQL daemon with:
<how to do that with mysqld_safe>

----

I don't really care about starting it at boot time now, but I thought that I might try to simulate a boot-time startup. mysql.server is in /usr/local/share/mysql/mysql.server and it won't start from there, so I moved it to /etc/rc.d/init.d/mysql.server , but it won't start there either.

I've tried to create a root user, but it says it "can't connect to local MySQL server through socket '/tmp/mysql.sock' (146) Check to see that mysqld is running and that the socket '/tmp/mysql.sock' exists!" It doesn't.

I tried to start the MySQL daemon, mysqld_safe, but it says I have an invalid user.

mysqld -u root says that it can't open the "data files".

Does this really so difficult? What am I doing wrong?
 
Old 10-28-2003, 06:27 PM   #2
g00$e
Member
 
Registered: Sep 2003
Location: Norfolk, VA
Distribution: Slackware
Posts: 119

Rep: Reputation: 15
"mysql.server is in /usr/local/share/mysql/mysql.server and it won't start from there"

Why won't it start? What is the error message?

"mysqld -u root says that it can't open the 'data files'."

Did the mysql_install_db script run correctly?

This should create your data files. On my install they are located in '/var/lib/mysql'.
 
Old 10-28-2003, 10:10 PM   #3
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Original Poster
Rep: Reputation: 31
Oh, sorry. I got so many error messages, I guess I left one out.

The error message for mysql.server is:
chown: mysql: invalid user
Starting mysqld daemon with databases from /usr/local/var
031028 21:55:42 mysql ended

---

The error message for ./scripts/mysql_install_db is above, the one for /usr/local/bin/mysql_install_db is the same.

Also, there's a /usr/local/var/mysql directory, but there's nothing in it.

Thanks.
 
Old 11-06-2003, 10:32 PM   #4
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Original Poster
Rep: Reputation: 31
It's been a while since anyone's posted anything here. I just thought I'd say that this MySQL stuff is really holding up the works. Any suggestions or help would be very much appreciated no matter how much of a shot in the dark they are.

Thanks.

This post also serves to bump this thread to the top of the list. I hope that's not cheating.
 
Old 11-07-2003, 12:19 AM   #5
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
add a mysql user and group to get rid of the chown error:


man useradd and groupadd


here is my entry in /etc/passwd for mysql user:

mysql:x:60:60:mysql:/var/lib/mysql:/bin/false

you can set the uid to any number not currently used i guess but becuse mysql isnt a human user, its set below 1000 on my box (on red hat it would be below 500).

/var/lib/mysql is mysql's home direcotry
/bin/false means you cant login to the box as mysql (wont work)

so based on my entry in my password file:

#groupadd -g 60 mysql
#useradd -g 60 -u 60 -s /bin/false -d /var/lib/mysql mysql

that would give u a mysql user and group. to add a user to a group, the group must exsist so add the group 1st. mysql should run as the mysql user and never as root (that way if mysql is compromised, the attacker will only be able to destroy stuff in mysql and not the whole system unless your whole system depended on mysql databases).

also note that /var/lib/mysql may be different for you mysql home directory.
 
Old 11-07-2003, 11:58 AM   #6
Travis86
Member
 
Registered: Dec 2002
Location: The land of GMT -6
Distribution: OS X, PS2 Linux, Ubuntu, IRIX 6.5
Posts: 399

Original Poster
Rep: Reputation: 31
That seems to be a step in the right direction. I tried to start MySQL with "mysql.server start", and it created "ibdata1" with the new mysql user. The ibdata1 file is supposed to be 10 mb, but it quit before it wrote anything. The error log says it thinks I'm out of disk space and it "can't init databases". I am not out of space. I ran it again and the error log said it had trouble auto-extending the data file ./ibdata1. What's wrong now?

Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
MySQL won't start! dezza Linux - Software 5 01-01-2005 07:21 AM
mysql doesn't start devit Linux - General 12 05-21-2004 03:24 PM
MySql error 2002, Cannot start mysql djchris Linux - Software 5 04-13-2004 06:12 PM
Cannot start MySQL cisco_kidd20 Linux - Software 13 03-25-2004 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration