Help - Search - Members - Calendar
Full Version: Mysql Issue
Linuxhelp > Support > Technical Support
Elfstone
Trying to set Apache/PHP/MySQL up and having some problems getting MySQL set up and working. Was half following the guide from the Guides section and half the mySQL documentation instructions(since they're a few versions ahead of when the guide was made). Either way, everything worked fine up until where I need to run mysqld_safe and then mysqladmin to set up my root pass. Here's what happens when I run mysqld_safe:

Starting mysqld deamon with databases from /usr/local/mysql/var
030705 13:36:59 mysqld ended

Not sure whether this was the expected outcome or not, I tried running mysqladmin with the required parameters and got:

./bin/mysqladmin: connect to server at localhost failed

error: 'Can't connect to local mySQL server through socket: '/tmp/mysql.sock' (111)'

Check that mysqld is running and that the socket '/tmp/mysql.sock' exists.

I type ps -A to see if the mysqld is running, and it isn't.

Any clue as to where I'm going wrong with this?

Thanks.
Joey
Hi,

What distribution are you running? What version of mySQL are you running? Do you have a file called /etc/my.cnf

If so, put the following lines in it:

log-update = /tmp/log-update.log
log = /tmp/loggeneral.log

Then try starting up mysql using safe_mysqld and if it fails, look in both of those log files to see if theres any indication of why.

Are you trying to start mysql as root or your user?
Elfstone
Distro: RH 8.0
MySQL v: 4.0.13

Don't have a /etc/my.cnf, and am starting MySQL as root.
Joey
Did you install the .tar.gz or the rpm for mysql?


Create a /etc/my.cnf with those 2 lines in it and try starting it up. The log files will be in /tmp
Elfstone
Installed from .tar.gz

after creating my.cnf with those lines and attempting to run the program I recieve the error "Found option without preceding group in config file: /etc/my.cnf at line: 1
Joey
there should be a my.cnf file with the .tar.gz source. run updatedb and then locate my.cnf and you should find it. Then copy it to /etc and add those 2 lines
Elfstone
Ran updatedb(the one located in /usr/bin?) and don't see any my.cnf anywhere except the one I'd already created in /etc
Joey
hmm maybe mysql 4 is different.

Okay I just downloaded 4.0.13 and in the support-files directory of the source code you should find some different my.cnf files. Grab whatever one and check to see if the log lines are in them and if not add em and throw the file into /etc and start it up.
Elfstone
After doing some quick research I simply added the [mysqld] group above the log option lines and it did the same thing as it did before. Log files say that it started and list the port and socket options but don't show any errors or problems.
Elfstone
Just to make sure I did what you said and edited/copied one of the .cnf files from the support directory over -- same result.
Joey
hmmm try running

safe_mysqld &


this will throw it in the background maybe thats the only problem
Elfstone
I just figured out the problem....since it was loading tables from the /var directory I went in there to see if everything was there. I discovered an error log file inside which showed my problem -- because I'd created the directories as root and mySQL runs as its own user, I needed to change the permissions in the directory so they belonged to the mysql user. Have done this and now everything seems like it'll run fine.

Thanks for all your time and suggestions. smile.gif
Joey
No problem smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.