{"id":538,"date":"2019-11-27T16:11:05","date_gmt":"2019-11-27T15:11:05","guid":{"rendered":"https:\/\/www.combell.com\/en\/help\/?post_type=ht_kb&#038;p=538"},"modified":"2020-03-08T17:17:40","modified_gmt":"2020-03-08T16:17:40","slug":"what-is-a-database-connection-string","status":"publish","type":"ht_kb","link":"https:\/\/www.combell.com\/en\/help\/kb\/what-is-a-database-connection-string\/","title":{"rendered":"What is a database connection string?"},"content":{"rendered":"<p>A connection string is the piece of information that is needed for your application to reach your database, for example a database name, username, password, port etc\u2026<\/p>\n<h3 id=\"exampleofaphpconnectionstring\">Example of a PHP connection string:<\/h3>\n<p><strong>WordPress:<\/strong><\/p>\n<pre><code>define('DB_NAME', 'ID111111_database_name');\n\/* MySQL database username \/\ndefine('DB_USER', 'ID111111_user_example'');\n\/* MySQL database password \/\ndefine('DB_PASSWORD', 'database-password');\n\/* MySQL hostname \/\ndefine('DB_HOST', \u2018mysql001.webhosting.be');\n<\/code><\/pre>\n<p><strong>Joomla:<\/strong><\/p>\n<pre><code>public $host = \u2018mysql001.webhosting.be';\npublic $user = 'ID111111_user_example';\npublic $password = 'database-password';\npublic $db = 'ID111111_database_name';\n<\/code><\/pre>\n<p><strong>Drupal:<\/strong><\/p>\n<pre><code>$databases = array (\n    'default' =&gt;\n    array (\n        'default' =&gt;\n        array (\n            'database' =&gt; 'ID111111_database_name',\n            'username' =&gt; 'ID111111_user_example\u2019,\n            'password' =&gt; 'database-password',\n            'host' =&gt; \u2018mysql001.webhosting.be',\n            'port' =&gt; '',\n            'driver' =&gt; 'mysql',\n            'prefix' =&gt; '',\n        ),\n    ),\n);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A connection string is the piece of information that is needed for your application to reach your database, for example a database name, username, password, port etc\u2026 Example of a PHP connection string: WordPress: define(&#8216;DB_NAME&#8217;, &#8216;ID111111_database_name&#8217;); \/* MySQL database username \/ define(&#8216;DB_USER&#8217;, &#8216;ID111111_user_example&#8221;); \/* MySQL database password \/ define(&#8216;DB_PASSWORD&#8217;, &#8216;database-password&#8217;);&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[23,4,43],"ht-kb-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb\/538"}],"collection":[{"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/comments?post=538"}],"version-history":[{"count":1,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb\/538\/revisions"}],"predecessor-version":[{"id":539,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb\/538\/revisions\/539"}],"wp:attachment":[{"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/media?parent=538"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb-category?post=538"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.combell.com\/en\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}