Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MySQL Directory

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

Tags:
  1. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    166
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,410
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you let us know the specific steps you took to change the MySQL datadir and error_log configuration values?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    166
    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:
    180
    Likes Received:
    0
    Trophy Points:
    166
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,410
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Bulent Tekcan

    Bulent Tekcan Well-Known Member

    Joined:
    May 11, 2004
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    166
    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:
    52
    Likes Received:
    7
    Trophy Points:
    133
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice