{"id":30023,"date":"2021-01-18T02:55:29","date_gmt":"2021-01-17T18:55:29","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=30023"},"modified":"2022-09-08T21:32:13","modified_gmt":"2022-09-08T13:32:13","slug":"how-to-check-the-mysql-version-in-my-cpanel","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-check-the-mysql-version-in-my-cpanel","title":{"rendered":"HOW TO: Check the MySQL version in My cPanel"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

HOW TO: Check the MySQL version in cPanel<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t
    \n \t
  1. Firstly, login to cPanel.<\/li>
    \n \t
  2. Next, click Server Information<\/strong> under General Information<\/strong> section on right margin.<\/li>
    \n \t
  3. Lastly, find MySQL Version<\/strong> under the Item<\/strong> column to know your MySQL version.<\/li>\n
    \n
  4. Or you can navigate cPanel >> Databases >> phpMyAdmin<\/b> to check MySQL version.<\/li>\n<\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t

    Check MySQL version with PHP script<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\t\t

    You have to create a new file on your account and place the following code inside it:<\/p>

    1<\/div>
    2<\/div>
    3<\/div>
    4<\/div>
    5<\/div>
    6<\/div>
    7<\/div>
    8<\/div>
    9<\/div>
    10<\/div>
    11<\/div>
    12<\/div>
    13<\/div>
    14<\/div>
    15<\/div>
    16<\/div><\/div><\/td>
    <?php<\/span><\/div>
    \u00a0<\/div>
    $mysql<\/span>\u00a0=<\/span>\u00a0mysqli_connect<\/span>(<\/span>‘localhost’<\/span>,<\/span>\u00a0‘USERNAME’<\/span>,<\/span>\u00a0‘PASSWORD’<\/span>)<\/span>;<\/span><\/div>
    \u00a0<\/div>
    \/* Test the MySQL connection *\/<\/span><\/div>
    if<\/span>\u00a0(<\/span>mysqli_connect_errno<\/span>(<\/span>)<\/span>)<\/span>\u00a0{<\/span><\/div>
    printf<\/span>(<\/span>“Connection failed: %s\\n”<\/span>,<\/span>\u00a0mysqli_connect_error<\/span>(<\/span>)<\/span>)<\/span>;<\/span><\/div>
    exit<\/span>(<\/span>)<\/span>;<\/span><\/div>
    }<\/span><\/div>
    \u00a0<\/div>
    \/* Print the MySQL server version *\/<\/span><\/div>
    printf<\/span>(<\/span>“MySQL server version: %s\\n”<\/span>,<\/span>\u00a0mysqli_get_server_info<\/span>(<\/span>$mysql<\/span>)<\/span>)<\/span>;<\/span><\/div>
    \u00a0<\/div>
    \/* Close the MySQL connection *\/<\/span><\/div>
    mysqli_close<\/span>(<\/span>$mysql<\/span>)<\/span>;<\/span><\/div>
    ?><\/span><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>

    Do not forget to replace the USERNAME<\/strong>\u00a0and PASSWORD<\/strong> with your cPanel username and password. Next, open your file in browser and you will see the current MySQL version.<\/p>

    You can generate the file through SSH<\/strong>,\u00a0FTP<\/strong> or from your cPanel >> File Manager\u00a0<\/strong>tool.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t\t\tCheck out the next article on HOW TO: Change the primary language in cPanel<\/a>.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"

    HOW TO: Check the MySQL version in cPanel Firstly, login to cPanel.   Next, click Server Information under General Information section on right margin.   Lastly, find MySQL Version under the Item column to know your MySQL version.   Or you can navigate cPanel >> Databases >> phpMyAdmin to check MySQL version. Check MySQL version […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[117],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30023"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=30023"}],"version-history":[{"count":1,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30023\/revisions"}],"predecessor-version":[{"id":31916,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30023\/revisions\/31916"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=30023"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=30023"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=30023"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=30023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}