AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[mariadb](ubuntu)

Martin Hope
Waleed Ahmed Shahid
Asked: 2023-03-25 16:53:48 +0800 CST

尝试安装 Mariadb 时获取 curl 命令未找到错误

  • 5

我正在关注 mariadb 文档,其中启动步骤已经完成,但是当我使用此命令时。

sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 
'https://mariadb.org/mariadb_release_signing_key.asc'

这个命令给我一个错误:

sudo: curl: command not found

我尝试使用这些命令在我的 Ubuntu 上安装 curl。

sudo apt update
sudo apt install curl

我不确定它现在是否已安装,但是当我再次尝试使用上述命令时它给了我同样的错误。

为了更好地理解,我还添加了一些其他命令的屏幕截图。

卷曲命令图片

mariadb
  • 3 个回答
  • 86 Views
Martin Hope
ysth
Asked: 2020-12-23 11:57:42 +0800 CST

ppa for ubuntu 打包 mariadb-10.4 for ubuntu 16.04 xenial

  • 0

是否有 ppa 或其他 repo 为 ubuntu 16.04 提供 mariadb 10.4 的 ubuntu 风格的包?

我正在尝试轻松地从 mariadb-10.0(服务器和客户端)升级一些虚拟机。

ppa 16.04 mariadb
  • 1 个回答
  • 121 Views
Martin Hope
Gaurav ahlawat
Asked: 2020-12-10 02:31:24 +0800 CST

无法在 Ubuntu 20.04 上安装 MariaDB

  • 3

我一直在尝试在我的系统上安装 MariaDB,但安装总是在以下步骤停止

$ sudo apt install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libfcgi-perl libhtml-template-perl libreadline5
  libterm-readkey-perl mariadb-client-10.3 mariadb-client-core-10.3 mariadb-server-10.3 mariadb-server-core-10.3 socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libfcgi-perl libhtml-template-perl libreadline5
  libterm-readkey-perl mariadb-client-10.3 mariadb-client-core-10.3 mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 socat
0 upgraded, 17 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/19.6 MB of archives.
After this operation, 165 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package galera-3.
(Reading database ... 213104 files and directories currently installed.)
Preparing to unpack .../00-galera-3_25.3.29-1_amd64.deb ...
Unpacking galera-3 (25.3.29-1) ...
Selecting previously unselected package libdbi-perl:amd64.
Preparing to unpack .../01-libdbi-perl_1.643-1_amd64.deb ...
Unpacking libdbi-perl:amd64 (1.643-1) ...
Selecting previously unselected package libconfig-inifiles-perl.
Preparing to unpack .../02-libconfig-inifiles-perl_3.000002-1_all.deb ...
Unpacking libconfig-inifiles-perl (3.000002-1) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../03-libaio1_0.3.112-5_amd64.deb ...
Unpacking libaio1:amd64 (0.3.112-5) ...
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../04-libreadline5_5.2+dfsg-3build3_amd64.deb ...
Unpacking libreadline5:amd64 (5.2+dfsg-3build3) ...
Selecting previously unselected package mariadb-client-core-10.3.
Preparing to unpack .../05-mariadb-client-core-10.3_1%3a10.3.25-0ubuntu0.20.04.1_amd64.deb ...
Unpacking mariadb-client-core-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Selecting previously unselected package mariadb-client-10.3.
Preparing to unpack .../06-mariadb-client-10.3_1%3a10.3.25-0ubuntu0.20.04.1_amd64.deb ...
Unpacking mariadb-client-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Selecting previously unselected package mariadb-server-core-10.3.
Preparing to unpack .../07-mariadb-server-core-10.3_1%3a10.3.25-0ubuntu0.20.04.1_amd64.deb ...
Unpacking mariadb-server-core-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Selecting previously unselected package socat.
Preparing to unpack .../08-socat_1.7.3.3-2_amd64.deb ...
Unpacking socat (1.7.3.3-2) ...
Selecting previously unselected package mariadb-server-10.3.
Preparing to unpack .../09-mariadb-server-10.3_1%3a10.3.25-0ubuntu0.20.04.1_amd64.deb ...
Unpacking mariadb-server-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../10-libcgi-pm-perl_4.46-1_all.deb ...
Unpacking libcgi-pm-perl (4.46-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../11-libfcgi-perl_0.79-1_amd64.deb ...
Unpacking libfcgi-perl (0.79-1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../12-libcgi-fast-perl_1%3a2.15-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.15-1) ...
Selecting previously unselected package libdbd-mysql-perl:amd64.
Preparing to unpack .../13-libdbd-mysql-perl_4.050-3_amd64.deb ...
Unpacking libdbd-mysql-perl:amd64 (4.050-3) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../14-libhtml-template-perl_2.97-1_all.deb ...
Unpacking libhtml-template-perl (2.97-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../15-libterm-readkey-perl_2.38-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.38-1build1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../16-mariadb-server_1%3a10.3.25-0ubuntu0.20.04.1_all.deb ...
Unpacking mariadb-server (1:10.3.25-0ubuntu0.20.04.1) ...
Setting up libconfig-inifiles-perl (3.000002-1) ...
Setting up libreadline5:amd64 (5.2+dfsg-3build3) ...
Setting up libcgi-pm-perl (4.46-1) ...
Setting up libhtml-template-perl (2.97-1) ...
Setting up socat (1.7.3.3-2) ...
Setting up galera-3 (25.3.29-1) ...
Setting up libfcgi-perl (0.79-1) ...
Setting up libterm-readkey-perl (2.38-1build1) ...
Setting up libaio1:amd64 (0.3.112-5) ...
Setting up libdbi-perl:amd64 (1.643-1) ...
Setting up libcgi-fast-perl (1:2.15-1) ...
Setting up mariadb-server-core-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Setting up libdbd-mysql-perl:amd64 (4.050-3) ...
Setting up mariadb-client-core-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Setting up mariadb-client-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Setting up mariadb-server-10.3 (1:10.3.25-0ubuntu0.20.04.1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.

进度条显示 94% 已完成,安装在过去 2 小时内卡在此处,我认为它不会恢复。谁能告诉我这里发生了什么以及如何在我的系统上安装 MariaDB?

software-installation package-management dpkg mysql mariadb
  • 1 个回答
  • 3973 Views
Martin Hope
Nicholas Saunders
Asked: 2020-11-15 10:56:54 +0800 CST

为什么 MariaDB 或 MySQL 不启动?

  • 0

显然清除和/或重新安装mysql并mariadb可能导致冲突,因此尝试:

root@mordor:~# 
root@mordor:~# sudo apt purge mariadb-server mariadb-client mysql-client mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'mysql-client' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
The following packages will be REMOVED:
  mariadb-client* mariadb-server*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
After this operation, 20.5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 181581 files and directories currently installed.)
Removing mariadb-client (1:10.4.17+maria~focal) ...
Removing mariadb-server (1:10.4.17+maria~focal) ...
root@mordor:~# 
root@mordor:~# 
root@mordor:~# rm -rf  /var/lib/mysql
root@mordor:~# 
root@mordor:~# sudo apt install mariadb-client mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  mariadb-client mariadb-server
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/6252 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Selecting previously unselected package mariadb-client.
(Reading database ... 181576 files and directories currently installed.)
Preparing to unpack .../mariadb-client_1%3a10.4.17+maria~focal_all.deb ...
Unpacking mariadb-client (1:10.4.17+maria~focal) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_1%3a10.4.17+maria~focal_all.deb ...
Unpacking mariadb-server (1:10.4.17+maria~focal) ...
Setting up mariadb-client (1:10.4.17+maria~focal) ...
Setting up mariadb-server (1:10.4.17+maria~focal) ...
root@mordor:~# 
root@mordor:~# mariadb
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@mordor:~# 
root@mordor:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.4.17 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: failed (Result: exit-code) since Sat 2020-11-14 10:43:31 PST; 1h 23min ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 90075 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"

Nov 14 10:43:29 mordor systemd[1]: Starting MariaDB 10.4.17 database server...
Nov 14 10:43:29 mordor mysqld[90075]: 2020-11-14 10:43:29 0 [Note] /usr/sbin/mysqld (mysqld 10.4.17-MariaDB-1:10.4.17+maria~focal-l>
Nov 14 10:43:29 mordor mysqld[90075]: 2020-11-14 10:43:29 0 [Warning] Could not increase number of max_open_files to more than 1638>
Nov 14 10:43:29 mordor mysqld[90075]: 2020-11-14 10:43:29 0 [Warning] Changed limits: max_open_files: 16384  max_connections: 500 (>
Nov 14 10:43:31 mordor systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 14 10:43:31 mordor systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 14 10:43:31 mordor systemd[1]: Failed to start MariaDB 10.4.17 database server.
root@mordor:~# 

我该如何开始mariadb?我可以再次清除它,但这只是一个循环。

password apt database mariadb sockets
  • 2 个回答
  • 353 Views
Martin Hope
David
Asked: 2020-08-31 12:38:26 +0800 CST

设置 50-server.cnf 时的未知变量 'pid-file=/run/mysqld/mysqld.pid'

  • 0

我正在修改 /etc/mysql/mariadb.conf.d/50-server.cnf

当我添加以下代码时,我得到错误未知变量 'pid-file=/run/mysqld/mysqld.pid'

[mysql]
default-character-set = utf8mb4

我正在添加 mysql 标记,但它不在文件中,但我不明白为什么这一行会影响似乎在 mysql conf 文件中定义的 pid 变量。

有任何想法吗?

50-server.cnf的全部内容

[server]

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql] 
default-character-set = utf8mb4

# * Basic Settings
#
user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
socket                  = /run/mysqld/mysqld.sock
#port                   = 3306
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
#skip-external-locking

bind-address            = 127.0.0.1
query_cache_size        = 16M

log_error = /var/log/mysql/error.log
expire_logs_days        = 10
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci

[embedded]

[mariadb]

[mariadb-10.3]
mysql mariadb
  • 1 个回答
  • 2330 Views
Martin Hope
unloco
Asked: 2020-06-12 04:18:08 +0800 CST

在 ubuntu 20.04 中安装 mariadb 5.5

  • 0

我需要安装 mariadb 5.5,因为我的旧数据库无法与 mariadb 10 一起使用并导致 mysql 崩溃!我尝试添加这个 repo 但没有运气

sudo sh -c 'echo "deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu trusty main" >> /etc/apt/sources.list.d/mariadb.list'

你知道怎么做吗?

我在添加回购后尝试搜索,这就是我得到的

sudo apt search mariadb-server

mariadb-server/focal,focal 1:10.3.22-1ubuntu1 all
  MariaDB database server (metapackage depending on the latest version)

mariadb-server-10.3/focal,now 1:10.3.22-1ubuntu1 amd64 [residual-config]
  MariaDB database server binaries

mariadb-server-core-10.3/focal 1:10.3.22-1ubuntu1 amd64
  MariaDB database core server files
mariadb 20.04
  • 1 个回答
  • 2248 Views
Martin Hope
Mario
Asked: 2020-05-26 12:27:34 +0800 CST

与 mariaDB 发生愚蠢冲突后无法安装 MySQL

  • 2

我完全忘记了 MySQL 已经安装在这台特定的计算机上并且我安装了 MariaDB,我也不知道在同一台计算机上同时安装两个软件包的后果,我一直在尝试完全卸载这两个安装并删除两者的依赖关系其中。我已经在网上查找了几个关于如何执行此操作的教程,但我仍然无法运行 MySQL,您将在下面找到终端窗口的屏幕截图以及我尝试过的许多尝试解决方案的列表,不幸的是我有尝试了很多,以至于我无法回忆起我尝试它们的顺序,我只想安装一个有效的 MySQL,但不知何故,我无法从以前的安装中删除一些东西,并且 MySQL 安装不起作用,我获取 dpkg:警告。任何和所有的帮助将不胜感激。(Ubuntu 20.04)

这是终端窗口的屏幕截图。

homeserver@ubuserv:~/Desktop$ ps ax | grep mysql
   4958 pts/0    S+     0:00 grep --color=auto mysql
homeserver@ubuserv:~/Desktop$ sudo mysql_secure_installation utility
[sudo] password for homeserver: 

Securing the MySQL server deployment.

Enter password for user root: 
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
homeserver@ubuserv:~/Desktop$ mysql --version
mysql  Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
homeserver@ubuserv:~/Desktop$ sudo systemctl stop mysql
Failed to stop mysql.service: Unit mysql.service not loaded.
homeserver@ubuserv:~/Desktop$ sudo systemctl stop mysql
Failed to stop mysql.service: Unit mysql.service not loaded.
homeserver@ubuserv:~/Desktop$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
homeserver@ubuserv:~/Desktop$ sudo apt install synaptic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
synaptic is already the newest version (0.84.6ubuntu5).
The following packages were automatically installed and are no longer required:
  hplip-data printer-driver-postscript-hp python3-renderpm
  python3-reportlab python3-reportlab-accel
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

homeserver@ubuserv:~/Desktop$ sudo service mysql restart
[sudo] password for homeserver: 
Failed to restart mysql.service: Unit mysql.service not found.
homeserver@ubuserv:~/Desktop$ apt search mysql | grep "\[install"
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libdbi-perl/focal,now 1.643-1 amd64 [installed]
libmysqlclient21/focal-updates,focal-security,now 8.0.20-0ubuntu0.20.04.1 amd64 [installed]
librdf0/focal,now 1.0.17-1.1ubuntu1 amd64 [installed,automatic]
mysql-client-8.0/focal-updates,focal-security,now 8.0.20-0ubuntu0.20.04.1 amd64 [installed]
mysql-client-core-8.0/focal-updates,focal-security,now 8.0.20-0ubuntu0.20.04.1 amd64 [installed]
mysql-common/focal,focal,now 5.8+1.0.5ubuntu2 all [installed]
mysql-server/focal-updates,focal-updates,focal-security,focal-security,now 8.0.20-0ubuntu0.20.04.1 all [installed]
mysql-server-8.0/focal-updates,focal-security,now 8.0.20-0ubuntu0.20.04.1 amd64 [installed]
mysql-server-core-8.0/focal-updates,focal-security,now 8.0.20-0ubuntu0.20.04.1 amd64 [installed]
rsyslog/focal,now 8.2001.0-1ubuntu1 amd64 [installed,automatic]
homeserver@ubuserv:~/Desktop$ sudo apt -f install mysql-server
[sudo] password for homeserver: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version (8.0.20-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
homeserver@ubuserv:~/Desktop$ sudo apt -f install mysql-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  mysql-client
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 9.424 B of archives.
After this operation, 110 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client all 8.0.20-0ubuntu0.20.04.1 [9.424 B]
Fetched 9.424 B in 1s (14,4 kB/s)       
Selecting previously unselected package mysql-client.
dpkg: warning: files list file for package 'mysql-server-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-8.0' missing; assuming package has no files currently installed
(Reading database ... 223970 files and directories currently installed.)
Preparing to unpack .../mysql-client_8.0.20-0ubuntu0.20.04.1_all.deb ...
Unpacking mysql-client (8.0.20-0ubuntu0.20.04.1) ...
Setting up mysql-client (8.0.20-0ubuntu0.20.04.1) ...
homeserver@ubuserv:~/Desktop$ dir
homeserver@ubuserv:~/Desktop$ cd ..
homeserver@ubuserv:~$ dir
Desktop  Documents  Downloads  Music  Pictures  Public  snap  Templates  Videos
homeserver@ubuserv:~$ cd Downloads
homeserver@ubuserv:~/Downloads$ dir
bprocessor-M11.zip    ClientBridgeWorking.bin        RepeaterBridgeWorking3.bin
ClientBridgeWorking2.bin  mysql-apt-config_0.8.15-1_all.deb  teamviewer_15.5.3_amd64.deb
homeserver@ubuserv:~/Downloads$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
Selecting previously unselected package mysql-apt-config.
dpkg: warning: files list file for package 'mysql-server-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-8.0' missing; assuming package has no files currently installed
(Reading database ... 223974 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.15-1_all.deb ...
Unpacking mysql-apt-config (0.8.15-1) ...
Setting up mysql-apt-config (0.8.15-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK
homeserver@ubuserv:~/Downloads$ sudo service mysql status
Unit mysql.service could not be found.
homeserver@ubuserv:~/Downloads$ sudo service mysql start
Failed to start mysql.service: Unit mysql.service not found.
homeserver@ubuserv:~/Downloads$ sudo dpkg -P mysql
dpkg: warning: ignoring request to remove mysql which isn't installed
homeserver@ubuserv:~/Downloads$ sudo apt-get install --reinstall mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 10 not upgraded.
Need to get 9.540 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server all 8.0.20-0ubuntu0.20.04.1 [9.540 B]
Fetched 9.540 B in 1s (17,6 kB/s)       
dpkg: warning: files list file for package 'mysql-server-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-core-8.0' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-8.0' missing; assuming package has no files currently installed
(Reading database ... 223979 files and directories currently installed.)
Preparing to unpack .../mysql-server_8.0.20-0ubuntu0.20.04.1_all.deb ...
Unpacking mysql-server (8.0.20-0ubuntu0.20.04.1) over (8.0.20-0ubuntu0.20.04.1) ...
Setting up mysql-server (8.0.20-0ubuntu0.20.04.1) ...

SU终端

homeserver@ubuserv:~/Desktop$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
homeserver@ubuserv:~/Desktop$ sudo apt install synaptic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
synaptic is already the newest version (0.84.6ubuntu5).
The following packages were automatically installed and are no longer required:
  hplip-data printer-driver-postscript-hp python3-renderpm
  python3-reportlab python3-reportlab-accel
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
homeserver@ubuserv:~/Desktop$ synaptic
homeserver@ubuserv:~/Desktop$ sudo su
root@ubuserv:/home/homeserver/Desktop# synaptic
root@ubuserv:/home/homeserver/Desktop# gksu synaptic

Command 'gksu' not found, did you mean:

  command 'gosu' from deb gosu (1.10-1)
  command 'ksu' from deb heimdal-clients (7.7.0+dfsg-1ubuntu1)
  command 'ksu' from deb krb5-user (1.17-6ubuntu4)

Try: apt install <deb name>

root@ubuserv:/home/homeserver/Desktop# gksu synaptic

Command 'gksu' not found, did you mean:

  command 'ksu' from deb heimdal-clients (7.7.0+dfsg-1ubuntu1)
  command 'ksu' from deb krb5-user (1.17-6ubuntu4)
  command 'gosu' from deb gosu (1.10-1)

Try: apt install <deb name>

root@ubuserv:/home/homeserver/Desktop# synaptic admin://
root@ubuserv:/home/homeserver/Desktop# xhost +si:localuser:root
localuser:root being added to access control list
root@ubuserv:/home/homeserver/Desktop# synaptic
^C
root@ubuserv:/home/homeserver/Desktop# synaptic
root@ubuserv:/home/homeserver/Desktop# synaptic
root@ubuserv:/home/homeserver/Desktop# synaptic
^C
root@ubuserv:/home/homeserver/Desktop# synaptic
root@ubuserv:/home/homeserver/Desktop# synaptic
root@ubuserv:/home/homeserver/Desktop# cd..
cd..: command not found
root@ubuserv:/home/homeserver/Desktop# cd ..
root@ubuserv:/home/homeserver# cd ..
root@ubuserv:/home# cd ..
root@ubuserv:/# cd ..
root@ubuserv:/# dir
bin    dev   lib    libx32  mnt   root  snap      sys  var
boot   etc   lib32  lost+found  opt   run   srv       tmp
cdrom  home  lib64  media   proc  sbin  swapfile  usr
root@ubuserv:/# sudo aptitude install mysql-server
sudo: aptitude: command not found
root@ubuserv:/# sudo apt install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version (8.0.20-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
root@ubuserv:/# 

在终端发出的命令

$ sudo apt install mysql-server
$ sudo mysql_secure_installation
$ sudo mysql
$ sudo apt remove mysql-server
$ sudo apt install mariadb-server
$ sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
$ sudo service mysql restart
$ sudo service mysql stop
$ sudo service mysql start
$ systemctl status mariadb.service
$ set mysql/config/mysqld/innodb_force_recovery=1
$ systemctl start mariadb
$ find /etc -name *.cnf
$ sudo apt-get purge mariadb-server
$ sudo dpkg -l | grep mariadb
$ sudo nano /etc/mysql/debian.cnf
$ sudo mysql_secure_installation
$ apt-get purge mysql-server\*
$ rm -rf /etc/my.cnf /etc/mysql
$ sudo apt-get remove --purge mysql*
$ sudo apt-get purge mysql*
$ sudo apt-get autoclean
$ sudo apt-get remove dbconfig-mysql
$ sudo apt-get remove ––purge mariadb-server
$ del mysql*
$ rm mysql*
$ sudo apt-get clean
$ ps -A|grep mysql
$ sudo pkill mysql
$ ps -A|grep mysqld
$ ps ax | grep mysql
$ sudo nano sources.list
$ sudo apt purge mariadb-*
$ sudo rm -rf /usr/share/mysql/
$ find mariadb.repo
$ find mariadb*
$ apt search mysql | grep "\[install"
$ sudo apt -f install mysql-server
$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

作为 SU 发出的命令

# service mysql stop
# killall -KILL mysql mysqld_safe mysqld
# apt-get --yes purge mysql-server mysql-client
# apt-get --yes autoremove --purge
# apt-get autoclean
# deluser --remove-home mysql
# delgroup mysql
# rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
# updatedb
# rm ~/.mysql_history
# sudo apt-get purge mariadb-server
# sudo dpkg -l | grep mariadb
# sudo apt-get purge mariadb-server 
# sudo dpkg -l | grep mariadb 
# edit /etc/mysql/mysql.conf.d/mysqld.cnf
# killall -KILL mysql mysqld_safe mysqld
# apt-get --yes purge mysql-server mysql-client
# apt-get --yes autoremove --purge
# apt-get autoclean
# deluser --remove-home mysql
# delgroup mysql
# apt-get remove --purge mariadb
# apt-get remove --purge mariadb*
# sudo rm -rf /etc/mysql/
# sudo apt install mysql-server
# sudo apt-get autoclean && sudo apt-get --force-yes remove mysql-community-server-dbgsym mysql-community-server mysql-server
# xhost +si:localuser:root
# synaptic

更新

我已经删除了突触中的 Libmysqlclient21,因为它看起来已损坏,尝试从突触成功卸载 MySQL 并从突触重新安装它失败,显然有一个我找不到的正在运行的 MySQL 进程,这阻止了 mysql-server-8.0 的安装(mysql-client、client-8.0、client-core-8.0、server 和 server-core-8.0 重新安装就好了)。接下来你会发现屏幕截图 https://pastebin.ubuntu.com/p/pJCxYm5K2w/

还 - -

internal Error, No file name for mysql-server:amd64
dpkg dependencies mysql mariadb
  • 2 个回答
  • 1824 Views
Martin Hope
pavel
Asked: 2020-04-18 02:07:01 +0800 CST

Ubuntu 无法启动,显示 mariadb 服务器错误

  • 1

重建 docker 后,Ubuntu 停止启动并显示闪烁的监视器 错误 我尝试进入 ubuntu 高级模式并使用以下命令删除 maria-db,但没有任何帮助

apt-get remove mariadb-server
apt-get remove mariadb
apt-get remove mariadb-service

在不重新安装操作系统的情况下如何解决这个问题?

更新:在尝试清除和禁用 mariadb 后出现此屏幕新错误

boot mariadb
  • 1 个回答
  • 150 Views
Martin Hope
xdnroot
Asked: 2020-03-07 17:26:11 +0800 CST

mariadb 和 mysql 的文件二进制文件和库在哪里?

  • 1

我想在 ubuntu 18.04 上明确删除 mariadb,然后重新安装。

但是我在尝试时遇到了问题。

为了清楚地删除 mariadb,我以 root 身份运行此命令

apt-get purge mariadb-server mariadb-client
apt-get autoremove

这是来自 /var/log/apt 的日志:

Start-Date: 2020-03-07  08:17:01
Commandline: apt install mariadb-server mariadb-client
Requested-By: xdnroot (1000)
Install: mariadb-server:amd64 (1:10.4.12+maria~bionic), mariadb-client:amd64 (1:10.4.12+maria~bionic)
End-Date: 2020-03-07  08:17:02

Start-Date: 2020-03-07  12:06:11
Commandline: apt-get purge mariadb-server mariadb-client
Purge: mariadb-server:amd64 (1:10.4.12+maria~bionic), mariadb-client:amd64 (1:10.4.12+maria~bionic)
End-Date: 2020-03-07  12:06:12

然后我删除了一些以“mysql”和“mariadb”开头的二进制文件和目录: /etc/mysql /var/lib/mysql 和 /var/lib/mariadb /usr/bin/mysql* 和 /usr/bin/mariadb * /usr/lib/mysql* 和 /usr/lib/mariadb*

第一个问题:当我重新安装mariadb时,有一个日志:“正在读取数据库......当前安装的283314个文件和目录。”

第二个问题:我重新安装mariadb-server和mariadb-client后,没有得到我之前删除的二进制和库文件和目录。即使是/etc/mysql,我也没弄明白。

所以,问题是“如何获取 mysql 二进制文件和库文件? ”

mysql mariadb
  • 1 个回答
  • 1554 Views
Martin Hope
George Ashby
Asked: 2019-12-23 02:59:54 +0800 CST

Ubuntu 终端:“apt-get”语法无效

  • 6

我最近刚刚在我的新笔记本电脑上安装了 Ubuntu,在安装过程中正确执行了所有步骤,从网上安装了新的应用程序和驱动程序。安装完 Ubuntu 后,我尝试通过终端安装 MariaDB,方法是输入:

sudo apt-get install software-properties-common

然后返回以下错误:

sudo apt-get install software-propterties-common
  File "<stdin>", line 1
    sudo apt-get install software-propterties-common
           ^
SyntaxError: invalid syntax

我怎样才能让我的 termianl 正常工作?

command-line apt mariadb
  • 1 个回答
  • 7382 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve