For Fedora Server 36 was installed
MySQL 8 Community through the
.rpm from MySQL Community Downloads. Now according with the Editing Conf. Files section is indicated to use the
/etc/my.cnf.d/community-mysql-server.cnf file, but it does not exist, it because the
/etc/my.cnf.d/ directory is empty, the truly valid file is
/etc/my.cnf/ where it currently contains:
[mysql] # # many comments # datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/run/mysqld/mysqld.pid
Well if is added
[mysql] # # many comments # port=3007 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/run/mysqld/mysqld.pid
saved the file and executed the following commands:
sudo systemctl stop mysqld sudo systemctl start mysqld
for the second command fails with the following message:
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details
systemctl status mysqld.service command shows
journalctl -xeu mysqld.service command shows
From above something Error 13: (Permission denied)
sudo cat /var/log/mysqld.log command shows
Can't start server: Bind on TCP/IP port: Permission denied Do you already have another mysqld server running on port: 3307?
sudo lsof -i -P command shows
What is missing or what should be done?
Note: I have this situation even with port
3308. Of course if is declared
3306 explicitly all work fine.