Ubuntu: LAMP: mysql could not be started

Keywords: LAMP/MAMP/WAMP - Virtual Machines - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: af3d0443-042c-e433-5661-7a8884eeeb4f

bndiagnostic output:

? Connectivity: Found possible issues
? Mysql: Found possible issues
? Apache: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-mysql/
https://docs.bitnami.com/general/how-to/troubleshoot-permission-issues/
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
LAMP was operating normally before a server repair. Service installed a new boot disk /sda, and now LAMP is on /sdb. I copied the contents from /sdb to /sda maintaining the same directory structure. When I run ./ctlscript.sh start, MySQL will not start. I reviewed others with similar issues and am not able to resolve the problem. Thanks

Hi @jtfinnell,

The Bitnami Diagnostic Tool warned you about a different process using the MySQL’s port. You can find this in the database’s log

2021-09-01T19:26:34.225355Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `bind()` failed with error: Address already in use (98). Do you already have another mysqld server running with Mysqlx ?'
2021-09-01T19:26:34.225575Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'

Please ensure port 33060 is available before starting the MySQL server.

Thanks

Thanks - found mysqld running on that port:
jtfinnell@system76-server:/opt/bitnami$ sudo lsof -i -P -n | grep LISTEN
systemd-r 955 systemd-resolve 13u IPv4 20861 0t0 TCP 127.0.0.53:53 (LISTEN)
sshd 1019 root 3u IPv4 28361 0t0 TCP *:22 (LISTEN)
sshd 1019 root 4u IPv6 28363 0t0 TCP *:22 (LISTEN)
mysqld 1068 mysql 22u IPv4 20332 0t0 TCP 127.0.0.1:33060 (LISTEN)
mysqld 1068 mysql 24u IPv4 20334 0t0 TCP 127.0.0.1:3306 (LISTEN)

Stopped mysql:
jtfinnell@system76-server:/opt/bitnami$ sudo /etc/init.d/mysql stop

Stopping mysql (via systemctl): mysql.service.

Port appears to be open:
jtfinnell@system76-server:/opt/bitnami$ sudo lsof -i -P -n | grep LISTEN
systemd-r 955 systemd-resolve 13u IPv4 20861 0t0 TCP 127.0.0.53:53 (LISTEN)
sshd 1019 root 3u IPv4 28361 0t0 TCP *:22 (LISTEN)
sshd 1019 root 4u IPv6 28363 0t0 TCP *:22 (LISTEN)

Tried restarting, but still unable to start MySQL…
jtfinnell@system76-server:/opt/bitnami$ sudo ./ctlscript.sh start
/opt/bitnami/mysql/scripts/ctl.sh : mysql could not be started
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 8080

Re-ran the diagnostic tool - has this error for the MYSQL portion:

[Mysql]

Found recent error messages in the MySQL error log:

2021-09-01T19:26:34.225575Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx
reported: ‘Value ‘*’ set to Mysqlx_bind_address, X Plugin can’t bind to it.
Skipping this value.’

Not sure if this is the problem, and/or how to resolve this, thanks

f5b65475-23a4-32f2-1a8f-a670c8a8ffd2

Turns out to have been a permissions issue with MySQL. The bitnami dx tool was reading an old mysqld.log file.

Fixed with:
sudo chown mysql:root -R /opt/bitnami/mysql/data

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.