DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi have install mysql-server 4.1 using apt-get install mysql-server4.1
The problem is that the /etc/init.d/mysql start returns the following message.
Any ideas?
'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' + debian
Try not to start as root, your beter of using a msql account such as mysqladmin or mysql I kno postgresql wont start as anyone other than postgres, plus running this as root can sometimes run security problems. have you installed the initial mysql databases (does it do this for you in debian, does in mandrake but doesnt in slackware)
No sense in yelling about it its been so long since I ran apt-get install mysql that I forgot exactally what the procedure is but as tomj88 said, have you installed the initial db? I don't remember if apt does that for you so try to run it: /usr/bin/mysql_install_db then follow the instructions.
just know this, once you have this installed it will run forever.
First, apt-get is almost certainly NOT the problem. APT is a wonderful package management suite, and easily beats just about anything out there...
That said, apt-get DOES automatically create the mysql database (which holds permissions information, etc.).
What happens if you run "mysql -u root" (there is no root password initially)? Please report the exact output. Note that you NEED NOT and SHOULD NOT _be_ root when running this... MySQL root and Linux root are entirely unrelated.
Also, try becoming Linux root ("su") and do an "/etc/init.d/mysql restart" to reset the server daemon. Report any anomalous results.
Finally, just to make sure your local routing (yes, networking matters for MySQL) is not broke, do a "ping localhost". If you do not get immediate replies then this is probably the problem.
thx a lot....At first apt-get creates the mysql user but with the /bin/false as an initial shell.. I haev change that to /bin/bash
I log in as mysql user
and i execute the command mysql -u root
ERROR 2002: Can't Connect to local MySql server through socket '/var/run/mysqld/mysqld.sock'
Let me check sth else
/etc/init.d/mysql as root or mysql user gives the following message
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket" '/var/run/mysqld/mysqd.sock'
Check that mysqld is running and that the socket '/var/run/mysqld/mysqld.sock' exists
The "mysql" user is a system account that SHOULD ABSOLUTELY NOT have a real shell (this is a HUGE security no-no)! As a general rule you should not modify the shell and group assignments created by APT unless you have a specific and well-researched reason. "mysql" is the user that the MySQL server runs _as_.
This is NOT the account that you should use to login to the server... as I said before, you do not need to be logged into any specific account (root or otherwise) to use the MySQL client. The MySQL usernames and passwords are completely independent of the base system's usernames (in /etc/passwd and /etc/shadow).
Running "/etc/init.d/mysql restart" is equivalent to "/etc/init.d/mysql stop; /etc/init.d/mysql start"... so the resultant error may be merely a failed attempt to shutdown an already stopped server. Did you get any subsequent message like "Starting MySQL Server... Done."? If not, do the following in order and report the results for each (note that "|" is a pipe, usually Shift-\):
ps -e | grep mysql
/etc/init.d/mysql start
ps -e | grep mysql
This will definitively tell us if mysql runs at all. Can you also post the output of "dpkg -l | grep mysql"?
Finally, just to give me an idea of your environment, can you post the output of "uname -a" and "cat /etc/issue"?
Yours,
Conrad Shultz
P.S.- I run a half-dozen MySQL servers (with replication and all) on Debian, all installed with apt-get, and have never had a problem, so I think there is probably something really obvious that we are missing, hence all the weird tests...
/etc/init.d/mysql restart
Stoping Mysql.....
Starting Mysql database server: mysqld failed..... (after some period)
Please take a look at the syslog
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket" '/var/run/mysqld/mysqd.sock'
Check that mysqld is running and that the socket '/var/run/mysqld/mysqld.sock' exists
Also
ps -e | grep mysql returns nothing
dpkg -l | grep mysql gives me the installed packages
it doesnt show anything....
telnet localhost 3306 dont connect
and also /var/lib/mysql has 777 permissions
the mysqld.sock file does not exist i have tried to create it with touch but it didnt help...
damn !
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.