File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
user_guide_src/source/database Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ add the config variables as a query string:
6666 database character set), which are present in the rest of the configuration
6767 fields, CodeIgniter will append them.
6868
69+ Configuring a MySQL socket connection
70+ -------------------------------------
71+
72+ To connect to a MySQL server over a filesystem socket, the path to the socket should be specified in
73+ the ``'hostname' `` setting. CodeIgniter's MySQLi driver will notice this and configure the
74+ connection properly.
75+
76+ .. literalinclude :: configuration/011.php
77+ :lines: 11-18
78+
6979Failovers
7080---------
7181
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