Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Cannot install or launch Mysql and MariaDB

$
0
0
I have this weird issue, I want to run an mysql server for local usage. The process mysqld is running:

Code:

$ ps -aux | grep "mysql"ericp       1826  0.0  0.6 2767196 202196 ?      Sl   08:26   0:01 /usr/sbin/mysqld --defaults-file=/home/ericp/.local/share/akonadi/mysql.conf --datadir=/home/ericp/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pidericp      12499  0.0  0.0   8864  2056 pts/1    S+   11:48   0:00 grep mysql
But if I try to launch the mysql client, it gives me an error.

Code:

$ mysqlERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
If I check the status of the service, it tells me there is no service available:

Code:

$ sudo systemctl status mysqlUnit mysql.service could not be found.
So I decided to install MariaDB instead since this is what I used the last time. And I got the same issue, cannot find the service. I re-lauched the installation to realized it installed the dependencies but not the server itself. It tries to stop the process, but it cannot do it:

Code:

$ sudo apt-get install mariadb-serverReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneThe following packages were automatically installed and are no longer required:  linux-image-6.1.0-23-amd64 linux-image-6.1.0-25-amd64Use 'sudo apt autoremove' to remove them.Suggested packages:  mailx mariadb-test netcat-openbsdThe following NEW packages will be installed:  mariadb-server0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.11 not fully installed or removed.Need to get 0 B/3,655 kB of archives.After this operation, 55.2 MB of additional disk space will be used.Preconfiguring packages ...(Reading database ... 424600 files and directories currently installed.)Preparing to unpack .../mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb ...Failed to stop mariadb.service: Unit mariadb.service not loaded.invoke-rc.d: initscript mariadb, action "stop" failed.Failed to stop mysql.service: Unit mysql.service not loaded.invoke-rc.d: initscript mysql, action "stop" failed.Attempt to stop MariaDB/MySQL server returned exitcode 5There is a MariaDB/MySQL server running, but we failed in our attempts to stop it.Stop it yourself and try again!dpkg: error processing archive /var/cache/apt/archives/mariadb-server_1%3a10.11.6-0+deb12u1_amd64.deb (--unpack): new mariadb-server package pre-installation script subprocess returned error exit status 1Errors were encountered while processing: /var/cache/apt/archives/mariadb-server_1%3a10.11.6-0+deb12u1_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
Judging from the ps command, I wonder if that mysql process is not used by KDE's Akonadi.

I don't think Mysql and MariaDB can coexist together, but is there a way to setup my own mysql service since it's clearly installed on the system.

Statistics: Posted by larienna — 2024-10-18 16:01 — Replies 1 — Views 36



Viewing all articles
Browse latest Browse all 3474

Trending Articles