File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
user_guide_src/source/database Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -190,3 +190,19 @@ Explanation of Values:
190190 etc.) not all values will be needed. For example, when using ``SQLite3 `` you
191191 will not need to supply a username or password, and the database name
192192 will be the path to your database file.
193+
194+ MySQLi
195+ ======
196+
197+ hostname
198+ --------
199+
200+ Configuring a Socket Connection
201+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202+
203+ To connect to a MySQL server over a filesystem socket, the path to the socket should be specified in
204+ the ``'hostname' `` setting. CodeIgniter's MySQLi driver will notice this and configure the
205+ connection properly.
206+
207+ .. literalinclude :: configuration/011.php
208+ :lines: 11-18
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Config ;
4+
5+ use CodeIgniter \Database \Config ;
6+
7+ class Database extends Config
8+ {
9+ // ...
10+
11+ // MySQLi over a socket
12+ public array $ default = [
13+ // ...
14+ 'hostname ' => '/cloudsql/toolbox-tests:europe-north1:toolbox-db ' ,
15+ // ...
16+ 'DBDriver ' => 'MySQLi ' ,
17+ // ...
18+ ];
19+
20+ // ...
21+ }
You can’t perform that action at this time.
0 commit comments