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.

cPanel and 64-bit MySQL

Discussion in 'Database Discussions' started by jefforange89, Dec 2, 2011.

  1. jefforange89

    jefforange89 Member

    Joined:
    Jan 5, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel seems to come with the 32-bit version of MySQL by default... is it possible to use the 64-bit version, and if so, what would be the best way to upgrade to it?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    cPanel will only use the 32-bit version of MySQL if your system OS is 32-bit. You cannot use 64-bit MySQL on a 32-bit OS system. You'd have to change your operating system to be 64-bit. You can check your architecture type with this command:

    Code:
    uname -a
    If it shows i386 or i686, both are 32-bit architecture. If it shows x86_64, then the system is 64-bit.
     
  3. jefforange89

    jefforange89 Member

    Joined:
    Jan 5, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your reply! I realize that running the 64-bit version on a 32-bit OS is impossible. I'm running a 64-bit OS though... and yet cPanel uses the 32-bit version all the same. Is there any way around this?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please provide the output from "uname -a" command. Sometimes, people believe that the OS is 64-bit when using i686 but that is actually 32-bit

    You can ensure when you query to see the architecture type for the rpm with this command:

    Code:
    rpm -qav --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep -i mysql
    When I do this on my 64-bit system with cPanel's MySQL, I show the following:

    Code:
    root@host [~]# rpm -qav --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep -i mysql
    MySQL-devel-5.1.58-0.glibc23.x86_64
    MySQL-shared-5.1.58-0.glibc23.x86_64
    MySQL-client-5.1.58-0.glibc23.x86_64
    MySQL-test-5.1.58-0.glibc23.x86_64
    MySQL-server-5.1.58-0.glibc23.x86_64
    Now, the only reason I can see for the wrong rpm type to be installed would be if you have /var/cpanel/sysinfo.config with the wrong architecture type listed:

    Code:
    grep arch /var/cpanel/sysinfo.config
    If it has the wrong architecture listed, then cPanel will try to install the 32-bit rpms rather than the 64-bit rpms. If you correct that file, but do not remove the 32-bit rpms, then both the 32-bit and the 64-bit rpms will be installed for MySQL.

    The correct return for a 64-bit system would be this:

    Code:
    root@host [~]# grep arch /var/cpanel/sysinfo.config 
    rpm_arch=x86_64
    If you have the wrong information in that file, you can fix that by moving the file and regenerating it:

    Code:
    mv /var/cpanel/sysinfo.config
    /scripts/gensysinfo
    If you have the wrong rpms installed, you can remove them and reinstall MySQL:

    Code:
    rpm -qav --qf "%{n}-%{v}-%{r}.%{arch}\n" | grep -i mysql
    rpm -e MySQL-fullrpmname
    /scripts/mysqlup --force
    For the fullrpmname portion, replace with the full name of each individual rpm. Of note, you will need to recompile Apache for the PHP MySQL modules once you've done this. You can do that in command line with "/scripts/easyapache" or using WHM > EasyApache (Apache Update) area.
     
  5. jefforange89

    jefforange89 Member

    Joined:
    Jan 5, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hmm... the sysinfo.config file does say x86_64, as do the MySQL RPMs. I also ran /scripts/mysqlup --force to ensure that they were installed. But even after this, it's still giving me the 32-bit memory limits... can you think of any reason why this would be the case? (nothing else is running on the server right now, and it has 24 GB in total, so it won't be an issue of running out of memory)

    111204 13:41:51 InnoDB: Initializing buffer pool, size = 7.0G
    111204 13:41:51 InnoDB: Error: cannot allocate 7516209152 bytes of
    InnoDB: memory with malloc! Total allocated memory
    InnoDB: by InnoDB 38079360 bytes. Operating system errno: 12
    InnoDB: Check if you should increase the swap file or
    InnoDB: ulimits of your operating system.
    InnoDB: On FreeBSD check you have compiled the OS with
    InnoDB: a big enough maximum process size.
    InnoDB: Note that in most 32-bit computers the process
    InnoDB: memory space is limited to 2 GB or 4 GB.
    InnoDB: We keep retrying the allocation for 60 seconds...
    111204 13:42:51InnoDB: Fatal error: cannot allocate the memory for the buffer pool
    111204 13:42:51 [ERROR] Plugin 'InnoDB' init function returned error.
    111204 13:42:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
     
  6. jefforange89

    jefforange89 Member

    Joined:
    Jan 5, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    It turns out the memory ulimit for mysql was set to 1 GB. Just have to change it to unlimited (or something higher, at any rate). Thanks for your help!
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I am uncertain if that is due to limiting it for 32-bit systems, since there is an error report about this message as a bug report:

    MySQL Bugs: #62269: CREATE TABLE...ENGINE=innodb; Does not fail if InnoDB couldn't load, MyISAM used

    This is the actual part of the error message (the rest is simply telling you details as to reasons it could be happening not stating you are on a 32-bit system):

    Of note, providing this error message at the onset would have been extremely helpful. It would also be great if you can provide the MySQL version you are using:

    Code:
    mysql_config --version
    Thanks!

    Edit: I didn't see your message as I was typing mine before you had the second post on having figured out the issue. Glad you got it sorted. Going forward, again, it would be best to provide the error message itself at the beginning.
     
  8. jefforange89

    jefforange89 Member

    Joined:
    Jan 5, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Mm, agreed. I'd just jumped to the (incorrect) conclusion that it was a 32-bit issue, and didn't consider alternatives. Thanks again!
     
Loading...

Share This Page