Skip to content
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

Only pass -P for socket connection when port option is specified #731

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Only pass -P for socket connection when port option is specified #731

merged 1 commit into from
Sep 25, 2023

Conversation

leonyu
Copy link
Contributor

@leonyu leonyu commented Sep 24, 2023

This fix implementation of be1f4b4 for GCP cloud-sql-proxy. cloud-sql-proxy creates multiple sockets on localhost pointing to multiple remote instances with default port.

$ curl -L http://mysqltuner.pl/ -o mysqltuner.pl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  254k  100  254k    0     0   524k      0 --:--:-- --:--:-- --:--:--  524k
$ MYSQL_PWD="[REDACTED]" ./mysqltuner.pl --socket=/cloudsql/[REDACTED] --user $USER --skippassword --forcemem 245760 --forceswap 0
 >>  MySQLTuner 2.2.12
	 * Jean-Marie Renouard <[email protected]>
	 * Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.pl/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[!!] Attempted to use login credentials, but they were invalid
exit 1
$ curl -LO https://raw.githubusercontent.com/leonyu/MySQLTuner-perl/master/mysqltuner.pl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  254k  100  254k    0     0  2973k      0 --:--:-- --:--:-- --:--:-- 2999k
$ MYSQL_PWD="[REDACTED]" ./mysqltuner.pl --socket=/cloudsql/[REDACTED] --user $USER --skippassword --forcemem 245760 --forceswap 0
 >>  MySQLTuner 2.2.12
	 * Jean-Marie Renouard <[email protected]>
	 * Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.pl/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials passed on the command line
[--] Assuming 245760 MB of physical memory
[!!] Assuming 0 MB of swap space (use --forceswap to specify)
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -----------------------------------------------------------------
...

This fix implementation of `be1f4b4` for [GCP cloud-sql-proxy](https://github.com/GoogleCloudPlatform/cloud-sql-proxy), which creates multiple sockets on localhost pointing to multiple remote instances with default port.
@leonyu
Copy link
Contributor Author

leonyu commented Sep 24, 2023

@i5513 please take a look as well

@jmrenouard jmrenouard merged commit 9d44e4c into major:master Sep 25, 2023
4 checks passed
@jmrenouard
Copy link
Collaborator

Thanks @leonyu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants