Archive for July, 2007
Cpanel mysql5 and php5 how to
I updated today to mysql5 and php5 .. and I ran into one problem…. the sql server would not start
after installing I was getting:
Starting MySQLCouldn't find MySQL manager or server [FAILED]
1st! how to install mysql5 and php5 with cpanel (with out having cpanel downgrade you automatically)
(read below)
* login to the WHM interface, and from “Server Configuration / Tweak Settings” choose in the “MySQL” section the 5.0 radio button. (This will actually run the script: /scripts/mysqlup that will download and install the latest MySQL5 rpms available at that time.)
* After completion as instructed you should rebuild your perl mysql libraries and rebuild apache (to have php build against the newly installed mysql library).
/scripts/perlinstaller --force Bundle::DBD::mysql
* On the WHM interface and from “Software” choose “Apache Update” and make sure you select the version of php that you want (in this case 5.21, I also select CURL) and rebuild (this will take some time) (if you have php5 already installed you can just run from your commandline:
/scripts/easyapache
and you are done….
But in my case … when I tried to run mysql I had a problem…
/etc/init.d/mysql start
Starting MySQLCouldn't find MySQL manager or server [FAILED]
to fix this I had to edit /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysql.server]
user=mysql
#basedir=/var/lib <--- COMMENT OUT THIS LINE
old-passwords = 1
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
the line basedir=/var/lib was causing the error and in case you are having the same problem commenting out that line will solve the problem and MySQL will start properly.
thanks for carlos’s blog
No commentsFix Apache - No space left on device: Couldn’t create accept lock or Cannot create SSLMutex
When dealing with mem-leaks in my mod_perl-apps I ran into a curious apache-problem. After a while apache could not be started but failed with strange errors like:
[emerg] (28)No space left on device: Couldn’t create accept lock
or
[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed
or
[Wed Dec 07 00:00:09 2005] [error] (28)No space left on device: Cannot create SSLMutex
There was definitely enough space on the device where the locks are stored (default /usr/local/apache2/logs/). I tried to explicetely different Lockfiles using the LockFile-directive but this did not help. I also tried a non-default AcceptMutex (flock) which then solved the acceptlock-issue and ended in the rewrite_log_lock-issue.
Only reboot of the system helped out of my crisis.
Solution: There were myriads of semaphore-arrays left, owned by my apache-user.
ipcs -s | grep apache
Removing this semaphores immediately solved the problem.
ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
or with theese command
ipcs -s | grep apache | awk ‘ { print $2 } ‘ | xargs ipcrm sem
thank you for this helpful Article to Carlosrivero
No comments