Mysql starting problem

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
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Mysql starting problem

Post by Cheeseboy »

Hi when i do this command:

Code: Select all

bin/mysqld_safe --user=mysql &
I get this error:
[1] 27643

Code: Select all

bash-3.00# Starting mysqld daemon with databases from /usr/local/mysql/var
STOPPING server from pid file /usr/local/mysql/tablesalt.pid
060329 15:53:07  mysqld ended
Does anyone know how i can fix this? Thx :D
Last edited by Cheeseboy on Thu Apr 20, 2006 6:21 pm, edited 1 time in total.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

I get this error:
[1] 27643
thats not an error, thats the PID for mysql
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

ok the mysql server is running but now when i try to log in like this:

Code: Select all

cd /usr/local/mysql/bin

Code: Select all

./mysql
I get this error:

Code: Select all

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Also, /tmp/mysql.sock doesnt exist. So how can i log in? :D
THis is what i found in my error log:
060329 19:34:26 mysqld started InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Make sure your my.cnf is setup and placed in the /etc/ folder. I had this same problem with a MySQL server update and needed to create the my.cnf before mysql would start again.

You can read up on what I did (and what I did about your socket problem) right here.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

Ok i checked my error log and this is what it says:
mysqld started InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created!
Please help me. (*goes crazy*) 8O
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

ok, all i need now when i do the command:

Code: Select all

bin/mysql_safe --user=mysql&
How can i get it to stop saying:

Code: Select all

STOPPING server from pid file /usr/local/mysql/var/tablesalt.pid
060330 14:44:28  mysqld ended
Does anybody know how i can fix this?
Last edited by Cheeseboy on Thu Apr 20, 2006 6:22 pm, edited 1 time in total.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

First recommendation. Reboot the machine (if you can). Then try to login to mysql using the standard login command

Code: Select all

mysql -u username -p
See if that works.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

Nope i get the socket error again. How can i (install) the socket?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

OK, next thing to try. Inside of the /etc/my.cnf file, in the [mysqld] section, add the line

Code: Select all

skip-innodb
Restart the server (reboot the machine). See if that does anything. From the problem I was having with the socket issue, it appeared to be caused by one of three things...
  • The server was already running when the admin tried to start it
  • The my.cnf had not been created
  • The server had not been stopped before installation/upgrade and caused a corruption.
There is a lot of talk about this problem at the MySQL forums. You might want to try there as well. Another to try is to google the entire error message. I found a lot of resources when I was searching.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

so i add this at the end of the page?

Code: Select all

skip-innodb
no # ?

Do you happen to know where i should put this:?

Code: Select all

To start mysqld at boot time you have to copy support-files/mysql.server
This could be the reason right here.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

If you can't start mysql at the prompt I am not sure you'd be able to at boot. The skip-innodb command goes under the [mysqld] heading in your my.cnf file.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

ahh 8O , still have that socket problem do you think i should install it using a rpm? Also how can i kill the server i think its running.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Honestly, at this point I would be inclined to uninstall MySQL and reinstall it. I like the RPMs, but I am a Linux newbie who really doesn't know beter.
User avatar
Cheeseboy
Forum Commoner
Posts: 67
Joined: Thu Mar 23, 2006 2:43 pm

Post by Cheeseboy »

ha, ive done that 3 times and (no charm) :cry:
Post Reply