R
R
Randewoo2019-12-03 20:29:30
MySQL
Randewoo, 2019-12-03 20:29:30

MySQL 8.0 - my.cnf decided to leave the server?

Hello. The dilemma is that you need to find the my.cnf config file.
Check here:

/etc/default
/etc/mysqld
/etc/my.cnf
/etc/mysqld

I found the config file mysqld.cnf in /etc/mysql/mysql.conf.d , here is its content:
[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

It can be seen that the socket is directly specified. Yeah, well, it's not like that.
Decided to do a search:
sudo grep -rnw 'bind-address' /etc/mysql
The result is emptiness.
Actually, problems:
0) Where can I find the real my.cnf with the MySQL config, not the daemon?
1) When connecting from PHP to MySQL-Server, an error occurs - "Fatal error: Uncaught PDOException: Could not connect to database (db)."
2) I connect to 127.0.0.1 - error - "Fatal error: Uncaught PDOException: Could not connect to database (db)."
3) I connect to localhost - no error. What is the problem?
4) How to still disable the connection via TCP and enable the connection only (!!!) via UDS.
My assumption is that some kind of trick came out in 8.0, because my registered user is [email protected] localhost

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2019-12-04
@martin74ua

And at you a config precisely differs from default? Did you tune it, make changes? Or just put mysql and let it work?
Judging by what you show - you have a default config. You showed it. What else are you looking for?
ps xa - see how mysql is running, the options are usually visible there and you can see what config it uses

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question