{"id":8593,"date":"2015-01-30T00:20:30","date_gmt":"2015-01-30T00:20:30","guid":{"rendered":"https:\/\/wp.okra.host\/article\/creating-a-database\/"},"modified":"2021-03-07T14:32:06","modified_gmt":"2021-03-07T13:32:06","slug":"creating-a-database","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/creating-a-database\/","title":{"rendered":"Eine Datenbank erstellen"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Additional MySQL databases, used for storing application data, may be created quickly within the <a title=\"Anmeldung am Bedienfeld\" href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a> via <strong>Databases<\/strong> &gt; <strong>MySQL Manager<\/strong>. When a database is created, grants are automatically setup to permit the primary\u00a0user access to the database. In multi-user environments, you may wish to create a separate user to keep your master\u00a0password confidential.<\/p>\n<h2 id=\"solution\" >L\u00f6sung<\/h2>\n<h3 id=\"creating-a-database\" >Eine Datenbank erstellen<\/h3>\n<ol>\n<li>Visit <strong>Databases<\/strong> &gt; <strong>MySQL Manager<\/strong><\/li>\n<li>Enter the new database name under\u00a0<strong>Name<\/strong>\n<ul>\n<li>Optionally deselect\u00a0<em>Backup database<\/em> if you wish for <span style=\"color: #ff0000\"><i>no backups<\/i><\/span> to be made. <span style=\"color: #ff0000\">If the database becomes corrupted, then there is no way to restore it<\/span>, so be careful.<\/li>\n<\/ul>\n<\/li>\n<li>Optionally click <b>Advanced<\/b> to toggle the backup frequency, count, and a file to import from. For larger databases, you may wish to hold 2 database copies and backup every day. This would\u00a0give you 48 hours of protection. Database import files may be plain-text or compressed.\n<div class=\"mceTemp\">\n<ul id=\"attachment_1354\" class=\"wp-caption alignnone\" style=\"width: 310px\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-sql-import.png\" rel=\"lightbox-0\" data-lbwps-width=\"1113\" data-lbwps-height=\"490\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-sql-import.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-1354 size-medium\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-sql-import-300x132.png\" alt=\"Importing a database\" width=\"300\" height=\"132\" \/><\/a>Importing a database<\/ul>\n<\/div>\n<\/li>\n<li>Click\u00a0<strong>Create<\/strong><\/li>\n<li>A database comprised of your\u00a0<em>database prefix<\/em> und\u00a0<em>name<\/em> will be created.\n<ul>\n<li>In the below example, this database will be named\u00a0<code>dc_test<\/code>\n<div id=\"attachment_595\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-prefix-illustration.png\" rel=\"lightbox-1\" data-lbwps-width=\"353\" data-lbwps-height=\"147\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-prefix-illustration.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-595\" loading=\"lazy\" class=\"size-medium wp-image-595\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/01\/db-prefix-illustration-300x125-1.png\" alt=\"Database prefix illustration in MySQL Manager\" width=\"300\" height=\"125\" \/><\/a><\/p>\n<p id=\"caption-attachment-595\" class=\"wp-caption-text\">Database prefix illustration in MySQL Manager<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 id=\"connecting\" >Connecting<\/h3>\n<p>To connect to this database, use a hostname value of\u00a0<code>localhost<\/code>,\u00a0your username, and your database password. If this password is forgotten at any time, you must <a title=\"Das MySQL-Passwort zur\u00fccksetzen\" href=\"https:\/\/kb.okra.host\/de\/mysql\/resetting-mysql-password\/\">reset it<\/a> unless it has been used elsewhere.<\/p>\n<p><span style=\"color: #0000ff\"><strong>Hinweis:<\/strong><\/span> localhost should be used for all local connectivity, unless <a title=\"Entfernte Verbindung zu MySQL\" href=\"https:\/\/kb.okra.host\/de\/mysql\/connecting-remotely-mysql\/\">connecting remotely<\/a> or connecting using\u00a0database connection pooling (&#8220;DBCP&#8221;) in Java. With DBCP, use a hostname of <code>127.0.0.1<\/code> &#8211; TCP socket over localhost.<\/p>\n<h3 id=\"permitting-access-by-other-users\" >Permitting access by other users<\/h3>\n<p>By default, only the primary user is permitted access to a newly created database. To enable another user read, write, or even a mix of privileges, they must be explicitly granted via\u00a0<strong>Databases<\/strong> &gt;\u00a0<strong>MySQL Manager<\/strong> &gt;\u00a0<strong> List Users and Databases<\/strong>.<\/p>\n<ol>\n<li>Select the database<\/li>\n<li>Enable\u00a0<strong>READ<\/strong> oder\u00a0<strong>WRITE<\/strong> privileges to allow the user read-only, read-write, or write-only access.\n<ul>\n<li>For normal operation, both READ and WRITE should be selected.<\/li>\n<li>Granular permissions may be selected by clicking on <b>Advanced<\/b>. Use at your own risk.<\/li>\n<\/ul>\n<\/li>\n<li>Click\u00a0<strong>Save<\/strong><\/li>\n<\/ol>\n<h2 id=\"see-also\" >Siehe auch<\/h2>\n<ul>\n<li><a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/privileges-provided.html\">Privileges provided by MySQL<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview Additional MySQL databases, used for storing application data, may be created quickly within the control panel via Databases &gt; MySQL Manager. When a database is created, grants are automatically setup to permit the primary\u00a0user access to the database. In multi-user environments, you may wish to create a separate user&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[61],"ht-kb-tag":[],"class_list":["post-8593","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-mysql"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8593"}],"version-history":[{"count":2,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8593\/revisions"}],"predecessor-version":[{"id":8597,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8593\/revisions\/8597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media\/8595"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8593"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8593"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}