MySQL service startup error
The MySQL database I'm having trouble with is hooked into an Apache site, which works fine, except for the part that accesses the database. I'm having trouble getting MySQL to run correctly. I put the file mysqld in /etc/init.d/ so that it would start automatically when the computer is turned on but I'm not sure if it actually does or not. When I log in as root, I type
"service mysqld start"
and I get
"Warning: Asked for 196608 thread stack, but got 126976 Fatal Error: Please read 'Security' section of the manual to find out how to run mysqld as root
/etc/init.d/mysqld: Shutdown Complete"
Meanwhile, when I try connecting to the database through the site I get:
can't connect to MySQL database: Can't connect to local MySql server through socket '/var/lib/mysql/mysql.sock' (2)
Now, the really weird part is if I go back to the bash prompt and type in
"service mysqld start --user=mysql &"
Warning: Asked for 196608 thread stack, but got 126976
/etc/init.d/mysqld: ready for connections.
Version: 4.0.21-Standard socket: '/var/lib/mysql/mysql.sock' port: 3306 official MySQL-standard binary
and then the console freezes and I have to Ctrl+C out of it, but the database connection is now working.
Is there a way to get this working when the computer starts, so I don't have to type in "service mysqld start --user=mysql &" every time?