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 Directory

Discussion in 'Database Discussions' started by Bulent Tekcan, Oct 12, 2016.

Tags:
  1. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I changed default mysql directory,because that area is small. I also changed datadir directory and error log directory. But mysql and mysqli sock file still link old directory mysql.sock -> ../var/lib/mysql/mysql.sock How can I change to new directory ? When I change that sock directory my phpmyadmin tell me a user-pass. Any idea ?

    Regards
     
    #1 Bulent Tekcan, Oct 12, 2016
    Last edited by a moderator: Oct 12, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    I have a 3 big DB and var partition is small. I changed that location under home directory

    1- MySQL stop
    2- Copy MySQL folder to new location
    3- Directory owner and permission set to mysql user
    4- Edit my.cnf datadir location,and also I changed php.ini mysql and mysqli location
    5- Run MySQL server

    It is OK and perfectly running. DB create and forum etc. working. But still mysql.sock link old location. When I change mysql.sock file location like that

    [mysqld]
    socket=/path/to/socket

    [client]
    socket=/path/to/socket

    MySql server working w/o any problem and I can see mysql.default_socket and mysqli.default_socket changed. But still MYSQL_SOCKET and MYSQLI_SOCKET show me old location from php info page.

    At this time WHM-PhpMyAdmin need password why I don't know. Any idea for this point ? I think my problem is symbolic link still link old sock,but I don't know deep details
     
    #3 Bulent Tekcan, Oct 13, 2016
    Last edited: Oct 13, 2016
  4. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Also I made this step

    1- Stop mysql
    2- Unlink old symlink from /var/lib/mysql/mysql.sock
    3- Create a new mysql.sock file under new folder like that

    touch mysql.sock
    chmod 1777 mysql.sock
    chown mysql.mysql mysql.sock
    Create a symlink for the sock file :-
    ln -s /home/xxxxx/xxxxx/mysql.sock /tmp

    And restart mysql again. But again sock file show me linked /var/lib/mysql/mysql.sock

    I'm crazy
     
    #4 Bulent Tekcan, Oct 14, 2016
    Last edited: Oct 14, 2016
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Internal case CPANEL-7258 addresses an issue where custom MySQL socket locations can result in cPanel deleting or recreating the /var/lib/mysql/mysql.sock symlink. This is fixed in cPanel version 60 (available in the "Current" and "Edge" build tiers):

    Fixed case CPANEL-7258: Fix issue with custom MySQL socket locations.

    Information about the build tiers and release process is available at:

    Product Versions and the Release Process - cPanel Knowledge Base - cPanel Documentation

    Thank you.
     
  6. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Hımmm my existing version is 11.42.1 (build 31) and I'm afraid of update to last one :) Because I have a 2 big forum on our server,I'm not sure plugin and etc. compatible new MySql server. And also not sure ModSec 2.4 rules work with new version ModSec
     
  7. cPanelJesse

    cPanelJesse Technical Analyst Manager
    Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    51
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Houston
    cPanel Access Level:
    Root Administrator
    @Bulent Tekcan,

    If you open a support ticket (tickets.cpanel.net) we'd be more than happy to help upgrade you to the latest version of cPanel/WHM as long as you're running CentOS/RHEL 6+

    Please make sure to detail any requirements your software has in the ticket and the support staff will let you know if there will be any issues with the upgrade.

    Thanks!
     
Loading...

Share This Page