Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Dec 2006
    Location
    Istanbul / TURKEY
    Posts
    40
    cPanel/Enkompass Access Level

    Root Administrator

    Default mysql and tmp dir problems

    Happy New Year Everyone,

    As a CPanel noob, I have 2 problems. But before that let me explain what I did to my new server. First I secured the temporary directories. Then moved my newly installed mysql 5.0 datadir to the second drive.

    Here are my problems:

    1. I transfered files and everything of mysql to the secondary drive. Change my.cnf accordingly. However whenever I restart mysql from WHM, I get the infamous socket error of mysql. I created a symlink of the sock file. It works OK but whenever I restart mysql, the smylink is gone mysql starts properly but I get the error message:

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

    And phpmyadmin also gives me an error : #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured).

    This is very strange as mysql starts and stops with no problems. Why is the smylink needed ? and how can I make in permanent. I searched the forums but couldn't find the solution to this.

    2. My /tmp directory is protected so that nothing is executed in it.
    /dev/tmpMnt /tmp ext2 loop,noexec,nosuid,rw 0 0
    After doing this I started getting errors from various applications. Like the phpmyadmin in Cpanel. It gives the error that sessions are not writable in tmp directory. I've done the same thing in my other server, which has Plesk, and have no problems about it. What do I have to do any ideas ?

  2. #2
    Member
    Join Date
    Dec 2006
    Location
    Istanbul / TURKEY
    Posts
    40
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    No help ?

  3. #3
    Member
    Join Date
    May 2005
    Location
    india
    Posts
    41

    Thumbs up Hi

    Hello

    Pls give write permission for tmp folder





    Regards
    Carlos

  4. #4
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    507

    Default

    ln -s /var/lib/mysql /path/to/new/mysql/dir
    Not everything that is counted counts and not everything that counts can be counted

Similar Threads & Tags
Similar threads

  1. Deleteing /tmp in home dir
    By MrFredbear in forum E-mail Discussions
    Replies: 3
    Last Post: 12-07-2009, 06:49 PM
  2. Spammer getting into the tmp dir. Need help.
    By flamesburn in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-18-2005, 06:54 AM
  3. /tmp dir
    By thehostinghut in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-10-2005, 05:40 AM
  4. Securing /tmp and Mysql problems
    By bmcpanel in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 06-26-2004, 08:42 AM
  5. supicious file in /tmp dir
    By shann in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-24-2003, 02:51 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube