{"id":53173,"date":"2015-08-31T04:43:53","date_gmt":"2015-08-31T08:43:53","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=53173"},"modified":"2016-02-17T05:28:11","modified_gmt":"2016-02-17T10:28:11","slug":"opencart-2-x-troubleshooter-how-to-get-rid-of-the-deprecated-mysql_connect-the-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-2-x-troubleshooter-how-to-get-rid-of-the-deprecated-mysql_connect-the-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message.html","title":{"rendered":"OpenCart 2.x. Troubleshooter. How to get rid of the &#8220;Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future&#8221; message"},"content":{"rendered":"<p><br \/>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=QpvYFdTcg9c?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. Troubleshooter. How to get rid of the &#8220;Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future&#8221; message<\/a><\/p>\r\n<p>This tutorial will show you how to get rid of the &#8216;Deprecated mysql_connect() The mysql extension is deprecated and will be removed in the future&#8217; message in OpenCart 2.x.:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_11.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_11-300x169.jpg\" alt=\"OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_1\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-59707\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_11-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_11-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_11.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<h3 class=\"custom\">Solution 1<\/h3>\r\n<ol>\r\n<li>\r\n<p>First, log into the <strong>cPanel dashboard<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Locate and enter the <strong>File Manager<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Once inside the <strong>File Manager<\/strong>, navigate to your store&#8217;s root folder. Most stores use the main domain, so the root folder will be <strong>public_html<\/strong>. If you are using a subfolder (e.g. example.com\/shop), then you will look for public_html\/shop.<\/p>\r\n<\/li>\r\n<li>\r\n<p>From here, click on the <strong>config.php<\/strong> and <strong>admin\/config.php<\/strong> files, then open them for editing.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Inside the editor, you will see the line of code that controls the mysql:<\/p>\r\n<pre class=\"brush:php\">define('DB_DRIVER', 'mysql');<\/pre>\r\n<p>and replace it with:<\/p>\r\n<pre class=\"brush:php\">define('DB_DRIVER', 'mysqli');<\/pre>\r\n<\/li>\r\n<li>\r\n<p><strong>Save Changes<\/strong>. Refresh the website to see that message is gone.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<h3 class=\"custom\">Solution 2<\/h3>\r\n<p>Your server might require <strong>&#8216;mmysqli&#8217;<\/strong> database driver to fix the issue. <\/p>\r\n<ol>\r\n<li>\r\n<p>Download the file <a href=\"https:\/\/raw.githubusercontent.com\/opencart-ce\/opencart-ce\/master\/upload\/system\/database\/mmysqli.php\" target=\"_blank\">&#8216;mmysqli.php&#8217;<\/a> to your hard drive.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Upload it to <strong>\/system\/database\/<\/strong> folder on your server.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Open <strong>config.php<\/strong> and <strong>admin\/config.php<\/strong> files on the server for editing.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Locate the following line:<\/p>\r\n<pre class=\"brush:php\">define('DB_DRIVER', 'mysqli');<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Change it to:<\/p>\r\n<pre class=\"brush:php\">define('DB_DRIVER', 'mmysqli.php');\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p><strong>Save Changes<\/strong>. Refresh the website to see that message is gone:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2-300x121.jpg\" alt=\"OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2\" width=\"300\" height=\"121\" class=\"aligncenter size-medium wp-image-59708\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2-300x121.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2-150x60.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/OpenCart-2.x.-Troubleshooter.-How-to-get-rid-of-the-Deprecated-mysql_connect-The-mysql-extension-is-deprecated-and-will-be-removed-in-the-future-message_2.jpg 982w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=QpvYFdTcg9c?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. Troubleshooter. How to get rid of the &#8220;Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future&#8221; message<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to get rid of the &#8216;Deprecated mysql_connect() The mysql extension is deprecated and will be removed in the future&#8217; message in OpenCart 2.x.<\/p>\n","protected":false},"author":37,"featured_media":59706,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[1893,765,1157,785],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/53173"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=53173"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/53173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/59706"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=53173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=53173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=53173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}