User Tools

Site Tools


mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mysql [2022/03/12 22:45]
jordan
mysql [2023/03/08 16:09] (current)
xujianglong ↷ Page moved from 内部资料:mysql to mysql
Line 164: Line 164:
  
 需要修改mysql配置文件,注释掉bind-server=127.0.0.1启用远程连接。Ubuntu下,MySQL配置文件路径''<nowiki>/etc/mysql/mysql.conf.d/mysqld.cnf</nowiki>'' ,MariaDB配置文件路径''<nowiki>/etc/mysql/mariadb.conf.d/50-server.cnf</nowiki>'' 需要修改mysql配置文件,注释掉bind-server=127.0.0.1启用远程连接。Ubuntu下,MySQL配置文件路径''<nowiki>/etc/mysql/mysql.conf.d/mysqld.cnf</nowiki>'' ,MariaDB配置文件路径''<nowiki>/etc/mysql/mariadb.conf.d/50-server.cnf</nowiki>''
 +
 +===== 本地登录时加127.0.0.1才能登录而不能用localhost =====
 +
 +直接通过localhost登录或者加-h localhost,提示Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13),需要在mysql配置文件加上对客户端的参数配置,例如Ubuntu系统中的路径为/etc/mysql/conf.d/mysql.cnf,增加以下内容
 +
 +<code>
 +[client]
 +host=127.0.0.1
 +
 +</code>
 +
 +====== InnoDB Failing to start / MySQL not loading plugins ======
 +
 +<code>
 +rm -rf /var/lib/mysql/*; mysql_install_db -u mysql; systemctl start mariadb.service
 +
 +</code>
  
  
mysql.1647096330.txt.gz · Last modified: 2022/03/12 22:45 by jordan