Bug 1976224 - mysql_setpermission: DBI connect failed: Connection error: port cannot be specified when host is localhost
Summary: mysql_setpermission: DBI connect failed: Connection error: port cannot be sp...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: mkulik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-25 14:42 UTC by Lukáš Zachar
Modified: 2021-08-26 14:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-26 09:20:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.