20191228DBA学习问题点记录

1、再次使用xshell5 远程连接Ubuntu登录MySQL时出现错误。 

       dba@dba:~$ mysql

       mysql: [ERROR] unknown option '--:'

解决思路:

检查mysql是否已经启动

root@dba:/app/mysql/support-files# service mysqld status

● mysqld.service - Mysql Server

  Loaded: loaded (/etc/systemd/system/mysqld.service; disabled; vendor preset: enabled)

  Active: active (running) since Sat 2019-12-28 00:44:16 EST; 32min ago

mysql启动后检查错误日志

root@dba:/app/mysql/support-files# vim /data/mysql/dba.err

错误日志无关

打开etc/my.cnf,确认是否填错

发现最后一行多打了个“:”,删除后即可。

再次输入mysql,就可以进入mysql。

root@dba:/app/mysql/support-files# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.7.28 MySQL Community Server (GPL)

2、创建多个实例时提示:bash: /data/3308/my.cnf: No such file or directory

随后打算安装yum,提示

There are no enabled repos.

Run "yum repolist all" to see the repos you have.

You can enable repos with yum-config-manager --enable

root@dba:~# yum repolist all

repolist: 0

原因是创建目录是330{7,8,9}写出了330{7.8.9}

root@dba:/etc/systemd/system# chown -R mysql.mysql /data/*

root@dba:/etc/systemd/system# systemctl start mysqld3307.service

root@dba:/etc/systemd/system# systemctl start mysqld3308.service

root@dba:/etc/systemd/system# systemctl start mysqld3309.service

你可能感兴趣的:(20191228DBA学习问题点记录)