Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Mysql Issue
Elfstone
post Jul 5 2003, 12:48 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



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.
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:01 PM
Post #2


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



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?
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:05 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



Distro: RH 8.0
MySQL v: 4.0.13

Don't have a /etc/my.cnf, and am starting MySQL as root.
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:10 PM
Post #4


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



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
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:14 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



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
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:16 PM
Post #6


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



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
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:25 PM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



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
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:32 PM
Post #8


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



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.
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:32 PM
Post #9


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



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.
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:37 PM
Post #10


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



Just to make sure I did what you said and edited/copied one of the .cnf files from the support directory over -- same result.
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:38 PM
Post #11


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



hmmm try running

safe_mysqld &


this will throw it in the background maybe thats the only problem
Go to the top of the page
 
+Quote Post
Elfstone
post Jul 5 2003, 01:44 PM
Post #12


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 3-July 03
From: NJ, USA
Member No.: 1,045



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
Go to the top of the page
 
+Quote Post
Joey
post Jul 5 2003, 01:47 PM
Post #13


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



No problem smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 11th December 2017 - 05:46 PM