{"id":2478,"date":"2013-03-01T16:55:01","date_gmt":"2013-03-01T16:55:01","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/03\/01\/346-add-admin-via-db\/"},"modified":"2023-12-22T15:15:57","modified_gmt":"2023-12-22T20:15:57","slug":"opencart-add-admin-via-db","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/","title":{"rendered":"How to add an Admin account in OpenCart 1.5 via MySQL"},"content":{"rendered":"<p>Errors in programs and databases can occur quickly and mysteriously. If something disasterous happens such as your admin account being deleted, it will seem imposible for your to fix as you need to get into the administrative area to troubleshoot or promote another user account to the Administrative role. In cases like this, you need to create an emergency admin account. This cannot be done through normal means and will need to be done with direct database interaction. Below is a guide on how to insert an admin account into your OpenCart 1.5 database.<\/p>\n<ol class=\"article_list\">\n<li>First, <a href=\"\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\" target=\"_blank\" rel=\"noopener\">log into your cPanel<\/a> account.<\/li>\n<li>From the main cPanel area, locate and find the <em>Databases<\/em> category, then click on the <strong>phpMyAdmin<\/strong> tool icon.<\/li>\n<li>Look to the left hand sidebar and click on the database name for your OpenCart installation. If you are unsure about the name, you can discover it by <a href=\"\/support\/edu\/opencart\/340-find-db-name\/\">following these instructions<\/a>.<\/li>\n<li>Once the database information loads into the right hand panel, look to the top tab menu, locate the <strong>SQL<\/strong> tab and click on it.<\/li>\n<li>Here is the <em>SQL query editor<\/em>. From here, we will enter some code that will create a new admin account for you. Below is the code to create a new admin account named <em><strong>admin123<\/strong><\/em> and with the password <em><strong>admin<\/strong><\/em>.<br \/> \n<div class=\"code_block\">INSERT INTO oc_user VALUES <br \/>(9999,1, &#8216;admin123&#8217;, &#8216;21232f297a57a5a743894a0e4a801fc3&#8217;, &#8221;,<br \/>&#8216;firstname&#8217;, &#8216;lastname&#8217;, &#8217;email@example.com&#8217;, &#8221;,<br \/>&#8216;0.0.0.0&#8217;,1,CURDATE());<\/div>\n<p> Feel free to change the &#8216;<em>firstname<\/em>&#8216;, &#8216;<em>lastname<\/em>&#8216;, and &#8216;<em>email@example.com<\/em>&#8216; data to anything you like as they should be obvious and are not crucial to getting you into the application. Do not change any of the other fields, however.<\/li>\n<li>Click on the <strong>Go<\/strong> button to activate the query and add the record.<\/li>\n<li>You will get a success message indicating the row was added. You can now test the user by logging into your OpenCart administrative area with the username <strong><em>admin123<\/em><\/strong> and the password <strong><em>admin<\/em><\/strong>.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Errors in programs and databases can occur quickly and mysteriously. If something disasterous happens such as your admin account being deleted, it will seem imposible for your to fix as you need to get into the administrative area to troubleshoot or promote another user account to the Administrative role. In cases like this, you need<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[81],"tags":[],"class_list":["post-2478","post","type-post","status-publish","format-standard","hentry","category-opencart"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-03-01T16:55:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-22T20:15:57+00:00\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"How to add an Admin account in OpenCart 1.5 via MySQL\",\"datePublished\":\"2013-03-01T16:55:01+00:00\",\"dateModified\":\"2023-12-22T20:15:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\"},\"wordCount\":326,\"commentCount\":15,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"OpenCart\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\",\"name\":\"How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-03-01T16:55:01+00:00\",\"dateModified\":\"2023-12-22T20:15:57+00:00\",\"description\":\"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add an Admin account in OpenCart 1.5 via MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting","description":"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/","og_locale":"en_US","og_type":"article","og_title":"How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting","og_description":"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-03-01T16:55:01+00:00","article_modified_time":"2023-12-22T20:15:57+00:00","author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"How to add an Admin account in OpenCart 1.5 via MySQL","datePublished":"2013-03-01T16:55:01+00:00","dateModified":"2023-12-22T20:15:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/"},"wordCount":326,"commentCount":15,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["OpenCart"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/","name":"How to add an Admin account in OpenCart 1.5 via MySQL | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-03-01T16:55:01+00:00","dateModified":"2023-12-22T20:15:57+00:00","description":"Has your admin user been deleted? This OpenCart tutorial will show you how to insert an emergency admin account using MySQL.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/opencart\/opencart-add-admin-via-db\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to add an Admin account in OpenCart 1.5 via MySQL"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2478"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2478\/revisions"}],"predecessor-version":[{"id":108543,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2478\/revisions\/108543"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}