mysql sockets
coming from a windows world... when i want to work with the mysql dbms i type mysql into the command. i do that in linux and i get
me@MyAgony:~$ mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/ mysqld.sock' (111) me@MyAgony:~$ when i go to the folder that the error specifies there is nothing there... whats up with that?? also do i have to set permissions to get some user accounts going? thanks, race btw im running debian 3 with mysql 3.2..... |
is mysqld server running? It normally listens on 3306 port.
lsof -i:3306 What happens when you do a telnet localhost 3306 |
There are a couple of things to check.
1) Check in your /root .bash_profile file and insure that your PATH line reads as PATH=$PATH:$HOME/bin:/usr/local/mysql/bin 2) Make sure that whatever user you're trying to log into MySQL with has file permissions to access the database 3) Check /etc/my.cnf and insure that the correct paths are listed for file access 4) Make sure that the MySQL daemon is in fact actually running. ps -ef | grep mysql. Should return about three or four lines with different processes running. 5) Try logging in : /usr/local/mysql/bin/mysqld_safe --user=mysql & (This of course depends on if you have a user called mysql) I had the same problem with my mysql and it mostly was file access permissions. I am installing an IDS system with Snort and I had to make sure that my user "snort" had permission to access the files. I simply made him/her a member of the mysql group and allowed that group to have access. Seemed to work. I still don't have it all the way up but am progressing. Try these things and repost if you don't have success. |
Quote:
MyAgony:/home/me# lsof -i:3306 MyAgony:/home/me# MyAgony:/home/me# telnet localhost 3306 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused MyAgony:/home/me# |
Quote:
I am starting to get the feeling that i didnt actually install mysql properly but take a look at this MyAgony:/home/me# dpkg -l | grep mysql ii libdbd-mysql-p 1.2216-2 mySQL database interface for Perl ii libmysqlclient 3.23.49-8.5 mysql database client library ii mysql-client 3.23.49-8.5 mysql database client binaries ii mysql-common 3.23.49-8.5 mysql database common files (e.g. /etc/mysql ii mysql-server 3.23.49-8.5 mysql database server binaries ii php4-mysql 4.1.2-6woody3 MySQL module for php4 MyAgony:/home/me# This is why i love linux some much!! |
One thing I should have pointed out was that I am talking from a RH9 perspective and the paths that I talked about are from that reference. The biggest thing to check is to make sure that all of the paths are properly listed and that whomever is signing in actually has Linux permissions to those directories and files. I fought with file permissions for days before I actually got it right, and then only after getting mysql's tech support involved. Which I do have to admit, are the best!! I am not that familiar with Debian yet, but soon.
|
All times are GMT -5. The time now is 04:26 PM. |