[MDEV-9738] MariaDB Server not creating .sock file on Linux Created: 2016-03-15 Updated: 2016-04-14 Resolved: 2016-04-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0.23 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Jorge F. Hernandez | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
Fedora Workstation 23 |
||
| Description |
|
Hey guys, I am trying to setup a LAMP server on my computer, all is installed, but when I try to access the MariaDB using PHP, it gives me: mysqli_connect(): (HY000/2002): No such file or directory, I asked PHP and they said that is because MariaDB is not creating a mysql.sock file, I tried adding
To my.cnf, but it doesn't get created, I also tried changing:
To false and still nothing. Without that file I cannot conenct to it using the computer name or localhost, instead I have to use the IP of the computer. What can I do? Thanks |
| Comments |
| Comment by Elena Stepanova [ 2016-03-15 ] | |
|
If you still can connect via TCP, please do so and check the value of @@socket variable (SELECT @@socket. Maybe it's overridden somewhere. If the file does not get created, please check the error log. Upon startup, it should say something like
Maybe it reports some errors. Finally, if everything seems to be okay but the file still isn't there while the server is running, set up some monitoring for the file, maybe something removes it. I remember we had a user's report that the file would disappear soon after startup. It was long time ago and the reason was not discovered, at some point it just stopped happening. Please also attach your cnf file(s) and the output of SHOW VARIABLES. | |
| Comment by Jorge F. Hernandez [ 2016-03-16 ] | |
|
Found it with SHOW VARIABLES at /var/lib/mysql/mysql.sock, so I created a symbolic link at /tmp to it, but if I have it configured to put it in /tmp why is it putting it in /var/lib/mysql/ ? | |
| Comment by Elena Stepanova [ 2016-03-16 ] | |
|
There are several possibilities: To rule out the first option, check the process list when your mysqld is running. If it shows /var/lib/mysql/mysql.sock on the command line, then it's overridden by mysqld_safe which takes it from its own config somewhere. Find it, modify it, it should be fine. If it's not the case, to rule out the second option, add something else to that config file right next to your socket setting, something obvious, like lock_wait_timeout=333 or something. Then restart the server and check the value. If it's still default, then your config is not read. If it's non-default, but different from what you've set, it's overridden somewhere else. Then you just need to find the config. mysql --help | grep cnf will give you a clue where to look, but don't forget to also check the configs and see what's included via include directives. | |
| Comment by Elena Stepanova [ 2016-04-14 ] | |
|
Please comment to re-open if you have further information on the issue. |