[DOCS-11067] Syntax error in MySQL command line examples Created: 29/Nov/17  Updated: 29/Oct/23  Resolved: 20/Dec/17

Status: Closed
Project: Documentation
Component/s: BI Connector
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ronan Bohan Assignee: Steve Renaker (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 6 years, 10 weeks, 6 days ago

 Description   

The 3 examples shown in this section of the docs (Connect from MySQL with Authentication) use the following format for the user parameter:

'--user=reportsUser?source=admin'

It looks like that initial quote is in the wrong place. Instead the parameter should be specified as follows:

--user='reportsUser?source=admin'

i.e. the quotes should only wrap the parameter value itself.

Also, the following section (Connect from MySQL with Authentication and TLS/SSL) specifies the user using a '-u' parameter. For consistency perhaps we should use just one format, either '-u' or '--user', rather than a mixture of the two. (Note: the '-u' parameter does not use an equals '=', while the '--user' variant does. See the MySQL docs for details)



 Comments   
Comment by Steve Renaker (Inactive) [ 30/Nov/17 ]

cc: ronan.bohan

Hi Ronan,

Thanks for noticing this. The exact syntax for invoking mysql from the command line is pretty flexible, and almost any placement or absence of quotes will work. On my laptop I've used all of the following:

mysql --user testUser?source=admin --default-auth=mongosql_auth -p
mysql --user=testUser?source=admin --default-auth=mongosql_auth -p
mysql --user 'testUser?source=admin' --default-auth=mongosql_auth -p
mysql '--user testUser?source=admin' --default-auth=mongosql_auth -p
mysql -u testUser?source=admin --default-auth=mongosql_auth -p

As long as the user is valid and the auth plugin is in the right place, they all work, and I've seen the same behavior on various Linux distros. Depending on how the user is set up, you may or may not need the "?source=admin" part. That being said, I agree that putting the quotes around the user string itself looks the best, and it's better to be consistent about using "--user" or "-u". I'll update the docs accordingly.

Generated at Thu Feb 08 08:01:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.