Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
e722f0df
Commit
e722f0df
authored
20 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#19474
by Daniel: extended documentation on database configuration.
parent
8f1e9cd7
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sites/default/settings.php
+30
-9
30 additions, 9 deletions
sites/default/settings.php
with
30 additions
and
9 deletions
sites/default/settings.php
+
30
−
9
View file @
e722f0df
...
...
@@ -37,21 +37,42 @@
*
* Note that the $db_url variable gets parsed using PHP's built-in
* URL parser (i.e. using the "parse_url()" function) so make sure
* not to confuse the parser. In practice, you should avoid using
* special characters that are not used in "normal" URLs either.
* That is, the use of ':', '/', '@', '?', '=' and '#', ''', '"',
* and so on is likely to confuse the parser; use alpha-numerical
* characters instead.
* not to confuse the parser. If your db_user, db_password,
* db_hostname, or db_name contain characters used to delineate
* $db_url parts, you can escape them via URI hex encodings:
*
* : = %3a / = %2f @ = %40
* + = %2b ( = %28 ) = %29
* ? = %3f = = %3d & = %26
*
* To specify multiple connections to be used in your site (i.e. for
* complex custom modules) you can also specify an associative array
* of $db_url variables with the 'default' element used until otherwise
* requested.
*
* If an optional $db_prefix is specified, all database table names
* will be prepended with this string. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no
* prefixes are desired, set to empty string ''.
* You can optionally set prefixes for some or all database table names
* by using the $db_prefix setting. If a prefix is specified, the table
* name will be prepended with its value. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no prefixes
* are desired, leave it as an empty string ''.
*
* To have all database names prefixed, set $db_prefix as a string:
*
* $db_prefix = 'main_';
*
* To provide prefixes for specific tables, set $db_prefix as an array.
* The array's keys are the table names and the values are the prefixes.
* The 'default' element holds the prefix for any tables not specified
* elsewhere in the array. Example:
*
* $db_prefix = array(
* 'default' => 'main_',
* 'users' => 'shared_',
* 'sessions' => 'shared_',
* 'role' => 'shared_',
* 'authmap' => 'shared_',
* 'sequences' => 'shared_',
* );
*
* Database URL format:
* $db_url = 'mysql://db_user:db_password@db_hostname/db_name';
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment