当我尝试在ubuntu 20.04机器上执行以下命令来安装mysql 5.7时,出现以下错误。我在安装mysql时遵循了这里的文档https://computingforgeeks.com/how-to-install-mysql-on-ubuntu-focal/。
第一个
/etc/mysql/my.cnf文件只有以下几行,其他行都被注解掉了,它是默认文件。
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
当我检查**/etc/mysql/conf.d/**目录时,发现了以下文件。
mysql.cnf
[mysql]
mysqldump.cnf文件系统
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
当我检查**/etc/mysql/mysql.conf.d/**目录时,下面的文件在那里。
我的网址.cnf
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
/etc/my.cnf文件如下所示。
basedir=/var/lib/mariadb/mysql
datadir=/var/lib/mariadb
user=mysql
1条答案
按热度按时间z31licg01#
安装mysql服务器mysql客户端
它将工作