Bug 1976224

Summary: mysql_setpermission: DBI connect failed: Connection error: port cannot be specified when host is localhost
Product: [Fedora] Fedora Reporter: Lukáš Zachar <lzachar>
Component: mariadbAssignee: mkulik
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: damien.ciabrini, hhorak, ljavorsk, mbayer, mkocka, mkulik, mmuzila, mschorm, SpikeFedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-26 09:20:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Zachar 2021-06-25 14:42:07 UTC
1. Please describe the problem:

mysql_setpermission fails to connect to local mariadb, claiming that 
DBI connect(';host=localhost;port=3306','newuser',...) failed: Connection error: port cannot be specified when host is localhost or embedded at /usr/bin/mysql_setpermission line 116.

the DBI connect string comes from the mysql_setpermission command defaults (was not a user input)


2. Specify used package versions
mariadb-server-utils-10.5.10-1.fc34


5. Can you reproduce this issue? If so, please provide the steps to reproduce the issue below:
# systemctl start mariadb
# mysql
mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.*  TO 'newuser'@'localhost' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
# mysql_setpermission  --user newuser

Comment 1 mkulik 2021-08-25 00:53:24 UTC
Fix for upstream and description is here:

https://github.com/MariaDB/server/pull/1896

Patch for fedora will be provided in next comment.

Comment 2 mkulik 2021-08-26 09:19:31 UTC
Fixed in upstream (versions 10.2->dev). No patches needed.

Comment 3 Lukas Javorsky 2021-08-26 11:22:41 UTC
This bug is reproducible in all Fedora releases.

Setting Version to Rawhide.