The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql and tmp dir problems

Discussion in 'General Discussion' started by Datcrack, Jan 2, 2007.

  1. Datcrack

    Datcrack Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Istanbul / TURKEY
    cPanel Access Level:
    Root Administrator
    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. Datcrack

    Datcrack Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Istanbul / TURKEY
    cPanel Access Level:
    Root Administrator
    No help ? :eek: :eek:
     
  3. carlosferns2004

    carlosferns2004 Active Member

    Joined:
    May 5, 2005
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    india
    Hi

    Hello

    Pls give write permission for tmp folder





    Regards
    Carlos
     
  4. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    ln -s /var/lib/mysql /path/to/new/mysql/dir
     
Loading...

Share This Page