-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update database connection with information on how to connect to a MySQL server over a socket #8629
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…server over a socket.
tangix
changed the title
Update database connection docs with information on how to connect to a MySQL server over a socket
docs: update database connection with information on how to connect to a MySQL server over a socket
Mar 15, 2024
Thank you! How about this? --- a/user_guide_src/source/database/configuration.rst
+++ b/user_guide_src/source/database/configuration.rst
@@ -66,16 +66,6 @@ add the config variables as a query string:
database character set), which are present in the rest of the configuration
fields, CodeIgniter will append them.
-Configuring a MySQL socket connection
--------------------------------------
-
-To connect to a MySQL server over a filesystem socket, the path to the socket should be specified in
-the ``'hostname'`` setting. CodeIgniter's MySQLi driver will notice this and configure the
-connection properly.
-
-.. literalinclude:: configuration/011.php
- :lines: 11-18
-
Failovers
---------
@@ -200,3 +190,19 @@ Explanation of Values:
etc.) not all values will be needed. For example, when using ``SQLite3`` you
will not need to supply a username or password, and the database name
will be the path to your database file.
+
+MySQLi
+======
+
+hostname
+--------
+
+Configuring a Socket Connection
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To connect to a MySQL server over a filesystem socket, the path to the socket should be specified in
+the ``'hostname'`` setting. CodeIgniter's MySQLi driver will notice this and configure the
+connection properly.
+
+.. literalinclude:: configuration/011.php
+ :lines: 11-18 |
kenjis
reviewed
Mar 16, 2024
@kenjis Hmmm... I seem to have messed up your changes and haven't found a way to undo that... Sigh. |
What's wrong? It seems okay. |
Yeah, now... I haven't really understood the GitHub magic and my GitKraken client gives me a hard time. |
kenjis
approved these changes
Mar 16, 2024
@tangix Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
database
Issues or pull requests that affect the database layer
documentation
Pull requests for documentation only
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added a section on how to connect to a MySQL server over a socket. I'm developing for Google Cloud Run / Cloud SQL and had to use the CodeIgniter source to understand how to connect to the Cloud SQL socket created with
--add-cloudsql-instances
parameter passed togcloud deploy
.Checklist: