{"id":999,"date":"2021-07-23T12:43:07","date_gmt":"2021-07-23T12:43:07","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/manage-databases\/"},"modified":"2021-07-23T12:43:07","modified_gmt":"2021-07-23T12:43:07","slug":"manage-databases","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/manage-databases\/","title":{"rendered":"Manage Databases"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\">\n<div id=\"versioned-article-header\">\n<p class=\"valid-version-info\"><em>Valid for versions 82 through the latest version<\/em><\/p>\n<\/div>\n<div id=\"version-select-group\" aria-label=\"select versions\">\n<h4>Version:<\/h4>\n<h4>82<\/h4>\n<\/div><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This interface allows you to list cPanel-managed databases on your server, each database\u2019s engine, and which user owns each database. You can also use this interface to rename databases.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>The maximum length of the database name is 64 characters. However, due to the method that cPanel &#038; WHM uses to store MySQL database names, each underscore character requires <strong>two<\/strong> characters of that limit. Therefore, if you enable database prefixing, the maximum length of the database name is <strong>63 characters<\/strong>, which includes both the database prefix and the underscore character. Each additional underscore requires another <strong>two<\/strong> characters of that limit.<\/li>\n<li>It is potentially dangerous to rename a MySQL\u00ae database. We <strong>strongly<\/strong> recommend that you create a backup of a MySQL database that you wish to rename.<\/li>\n<li>If you rename a database, the process terminates all active connections to the database.<\/li>\n<li>You <strong>must<\/strong> manually update configuration files and applications to use the new database name.<\/li>\n<li>Larger and more complex databases requires additional time to rename.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"databases\">Databases<\/h2>\n<p>This interface provides a table that lists all of the databases on the server.<\/p>\n<p>Click each column heading to sort the list by that column. Search for a particular database with the <em>Search<\/em> text box.<\/p>\n<h3 id=\"rename-a-database\">Rename a database<\/h3>\n<p>To rename a database, perform the following steps:<\/p>\n<ol>\n<li>Click the pencil icon in the row that corresponds to the database.<\/li>\n<li>\n<p>In the <em>Rename<\/em> to text box, enter the new name for the database. <\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n        If database prefixing is enabled, this parameter <strong>must<\/strong> include the database prefix for the account.\n    <\/div>\n<\/div>\n<\/li>\n<li>\n<p>Click <em>Submit<\/em>.<\/p>\n<\/li>\n<\/ol>\n<h4 id=\"how-cpanel-whm-renames-a-mysql-database\">How cPanel &#038; WHM renames a MySQL database<\/h4>\n<p>MySQL does <strong>not<\/strong> allow you to rename a database. When cPanel &#038; WHM \u201crenames\u201d a database, the system performs the following steps:<\/p>\n<ol>\n<li>The system creates a new database.<\/li>\n<li>The system moves data from the old database to the new database.<\/li>\n<li>The system recreates grants and stored code in the new database.<\/li>\n<li>The system deletes the old database and its grants.<\/li>\n<\/ol>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>If any of the first three steps fail, the system returns an error and attempts to restore the database\u2019s original state. If the restoration process fails, the API function\u2019s error response describes these additional failures.<\/li>\n<li>In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants.<\/li>\n<\/ul><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Valid for versions 82 through the latest version Version: 82 Overview This interface allows you to list cPanel-managed databases on your server, each database\u2019s engine, and which user owns each database. You can also use this interface to rename databases. Warning: The maximum length of the database name is 64 characters. However, due to the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1000,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/999"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=999"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/999\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/1000"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}