← Back to team overview

maria-discuss team mailing list archive

Re: problems getting MariaDB to start after install

 

Please post the content of your error logs (journalctl -u mariadb.service)

Le ven. 30 déc. 2022, 21:50, Tim McConnell <tmcconnell168@xxxxxxxxx> a
écrit :

> Hi Guillame,
> Well, that almost worked, mysql_install_db ran and completed. Now it
> won't let me login as root. If I try 'mysql -u root -p'and hit enter
> when prompted for a password I get this
> Enter password:
> ERROR 2013 (HY000): Lost connection to server at 'handshake: reading
> initial communication packet', system error: 104
> and I have to use 'sudo systemctl start mariadb.socket' instead of
> 'sudo systemctl start mariadb.service' but it has to be restarted if
> authentication fails.
> so the rest of the KB you sent does no good since I still can't access
> the DB, or even view what was created by the installer command.
>
> --
> Tim McConnell <tmcconnell168@xxxxxxxxx>
>
>
> On Fri, 2022-12-30 at 08:17 +0100, Guillaume Lefranc wrote:
> > Hi Tim,
> >
> > It seems you haven't initialized the system tables like explained
> > here: https://mariadb.com/kb/en/mysql_install_db/
> >
> > Regards
> > -GL
> >
> > Le ven. 30 déc. 2022, 03:32, Tim McConnell <tmcconnell168@xxxxxxxxx>
> > a écrit :
> > > Hello list,
> > > I have installed and re-installed MariaDB trying to get prelude to
> > > work and I'm at a loss.
> > > When I try to run 'sudo systemctl start mariadb.service' I get
> > > these errors:
> > > Job for mariadb.service failed because the control process exited
> > > with error code.
> > > See "systemctl status mariadb.service" and "journalctl -xeu
> > > mariadb.service" for details.
> > > so I read the KB and found I'm supposed to use 'sudo systemctl
> > > status mariadb.socket'
> > > which gives this:
> > > ● mariadb.socket - MariaDB 10.6.11 database server (socket
> > > activation)
> > >  Loaded: loaded (/lib/systemd/system/mariadb.socket; static)
> > >  Active: active (listening) since Thu 2022-12-29 18:39:25 CST; 26s
> > > ago
> > >  Until: Thu 2022-12-29 18:39:25 CST; 26s ago
> > >  Triggers: ● mariadb.service
> > >  Docs: man:mariadbd(8)
> > >  https://mariadb.com/kb/en/library/systemd/
> > >  Listen: @mariadb (Stream)
> > >  /run/mysqld/mysqld.sock (Stream)
> > >  [::]:3306 (Stream)
> > >  Tasks: 0 (limit: 8190)
> > >  Memory: 4.0K
> > >  CPU: 2ms
> > >  CGroup: /system.slice/mariadb.socket
> > >
> > > and then if I try to run 'sudo mysqlcheck -A' I'll get this error:
> > > mysqlcheck: Got error: 2013: Lost connection to server at
> > > 'handshake: reading initial communication packet', system error:
> > > 104 when trying to connect
> > >
> > > I then check the status of the socket and get this output:
> > > sudo systemctl status mariadb.socket
> > > × mariadb.socket - MariaDB 10.6.11 database server (socket
> > > activation)
> > >  Loaded: loaded (/lib/systemd/system/mariadb.socket; static)
> > >  Active: failed (Result: service-start-limit-hit) since Thu 2022-
> > > 12-29 18:4>
> > >  Duration: 1min 11.173s
> > >  Triggers: ● mariadb.service
> > >  Docs: man:mariadbd(8)
> > >  https://mariadb.com/kb/en/library/systemd/
> > >  Listen: @mariadb (Stream)
> > >  /run/mysqld/mysqld.sock (Stream)
> > >  [::]:3306 (Stream)
> > >  CPU: 2ms
> > >
> > > I then ran 'sudo journalctl -n 20 -u mariadb.service' (as per the
> > > kb) and get:
> > > Dec 29 19:12:45 DebianTim mariadbd[3660996]: 2022-12-29 19:12:45 0
> > > [Note] /usr/sbin/mariadbd (server 10.6.11-MariaDB-1) starting as
> > > process 3660996 ...
> > > Dec 29 19:12:45 DebianTim systemd[1]: mariadb.service: Main process
> > > exited, code=exited, status=1/FAILURE
> > > Dec 29 19:12:45 DebianTim systemd[1]: mariadb.service: Failed with
> > > result 'exit-code'.
> > > Dec 29 19:12:45 DebianTim systemd[1]: Failed to start MariaDB
> > > 10.6.11 database server.
> > >
> > > I then found this in my logs:
> > > 2022-12-29 19:12:45 0 [Warning] Plugin 'OQGRAPH' is of maturity
> > > level gamma while the server is stable
> > > 2022-12-29 19:12:45 0 [Note] CONNECT: Version 1.07.0002 March 22,
> > > 2021
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Compressed tables use zlib
> > > 1.2.13
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Number of pools: 1
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Using crc32 + pclmulqdq
> > > instructions
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Using liburing
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Initializing buffer pool,
> > > total size = 134217728, chunk size = 134217728
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Completed initialization of
> > > buffer pool
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: 128 rollback segments are
> > > active.
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Creating shared tablespace for
> > > temporary tables
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Setting file './ibtmp1' size
> > > to 12 MB. Physically writing the file full; Please wait ...
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: File './ibtmp1' size is now 12
> > > MB.
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: 10.6.11 started; log sequence
> > > number 33836; transaction id 4
> > > 2022-12-29 19:12:45 0 [Note] Plugin 'FEEDBACK' is disabled.
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Loading buffer pool(s) from
> > > /var/lib/mysql/ib_buffer_pool
> > > 2022-12-29 19:12:45 0 [ERROR] Could not open mysql.plugin table:
> > > "Table 'mysql.plugin' doesn't exist". Some plugins may be not
> > > loaded
> > > 2022-12-29 19:12:45 0 [Note] InnoDB: Buffer pool(s) load completed
> > > at 221229 19:12:45
> > > 2022-12-29 19:12:45 0 [Warning] You need to use --log-bin to make -
> > > -expire-logs-days or --binlog-expire-logs-seconds work.
> > > 2022-12-29 19:12:45 0 [ERROR] Can't open and lock privilege tables:
> > > Table 'mysql.servers' doesn't exist
> > > 2022-12-29 19:12:45 0 [Note] Using systemd activated socket host ::
> > > port 3306
> > > 2022-12-29 19:12:45 0 [Note] Using systemd activated unix socket
> > > /run/mysqld/mysqld.sock
> > > 2022-12-29 19:12:45 0 [Note] Using systemd activated unix socket
> > > @mariadb
> > > 2022-12-29 19:12:45 0 [ERROR] Fatal error: Can't open and lock
> > > privilege tables: Table 'mysql.db' doesn't exist
> > > 2022-12-29 19:12:45 0 [ERROR] Aborting
> > > Warning: Memory not freed: 280
> > >
> > > So, how do I get this to work?
> > > I even tried the apparmor suggestion from the KB and it didn't
> > > work, I even tried stopping apparmor service completely and still
> > > couldn't get it to work.
> > > I'm using Debian testing (Bookworm) with Kernel version 6.0.0-6-
> > > amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1 (2022-12-09) x86_64
> > > GNU/Linux
> > > and MariaDB 10.6.11 from the Debian repository.
> > >
> > > Thanks in advance for any help.
> > >
>

Follow ups

References