Skip to content

Commit b7dcf45

Browse files
committed
continued proof of concept
1 parent a47abdf commit b7dcf45

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

cloud-sql/mysql/mysql/test/proxy-setup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ if [[ $SETUP_STYLE -ne "tcp" ]]; then
2424
socket="--unix-socket /cloudsql"
2525
fi
2626

27+
echo "Setting up cloud-sql-proxy for $SETUP_STYLE connections"
28+
2729
if [[ ! -f cloud-sql-proxy ]]; then
2830

2931
curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/${PROXY_VERSION}/cloud-sql-proxy.linux.amd64
@@ -38,3 +40,5 @@ fi
3840

3941
./cloud-sql-proxy $CLOUD_SQL_CONNECTION_NAME $socket &
4042
sleep 10
43+
44+
echo "Proxy ready for use"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -e
2+
3+
# Copyright 2025 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Proof of concept: shutting down proxy
18+
19+
echo "Shutting down proxy process"
20+
21+
pkill -f "cloud-sql-proxy" || echo "cloud-sql-proxy process not found. Was it already stopped?"
22+

0 commit comments

Comments
 (0)