MYSQL issue in slackware 13.0
Hi,
I have installed slackware 13.0 in my pc and I use the the build-in mysql server that slackware has. Every time my computer starts I receive the following error: Code:
Starting mysqld daemon with databases from /var/laib/mysql Every time I try to restart mysql server with the following command: Code:
/etc/rc.d/rc.mysqld restart Code:
root@slackfractals:/home/simeon# nohup: redirecting stderr to stdout Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) I was looking around in the Internet to find a solution, but without any success. The only things I found out are:
|
Hi,
Did you initially install the database (mysql_install_db command) and set a password (mysqladmin command) for the mysql root user? Also check to see if there is a /etc/my.cnf file present. I do believe the rc.mysql file has this info inside it. Hope this helps. |
hi druuna,
thanks for your response. Actually I didn't install anything. I just installed the packages for mysql, which are offered from slackware. Nevertheless, I run mysql_install_db and I get the following: Code:
Installing MySQL system tables... Code:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL Code:
# Example MySQL config file for large systems. What else could I do; |
Hi,
I do believe that the mysql db must be running before you execute the mysql_secure_installation part (never used it myself. I use the /usr/bin/mysqladmin -u root password 'new-password' part, and the db must be up and running for that one). Start the db with the following statement: mysqld_safe --user=mysql 2>&1 >/dev/null & and try the mysql_secure_installation step again. I'm fairly sure this time it will work. BTW: Do you really need the large.cnf? Most of the time (home usage) medium or small will do fine. In short these are the basic steps to take after installing mysql: 1) Install database: mysql_install_db --user=mysql, 2) Start mysql: mysqld_safe --user=mysql 2>&1 >/dev/null &, 3) Set root password: mysqladmin -u root password 'new-password' (or use the mysql_secure_installation command), 4) Stop mysql: mysqladmin -p shutdown (passwd will be asked). Done. Hope this helps. |
Unfortunately I didn't have any success. Here are my results.
With the other steps you gave me I had the following result: 1) Install database: mysql_install_db --user=mysql, Code:
Installing MySQL system tables... mysql-bin.index Code:
./mysql-bin.000001 Code:
offset 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef |
Check that /var/lib/mysql and all files in it be owned by user mysql:mysql. If not, chown -R mysql:mysql /var/lib/mysql.
|
I have to agree with Didier Spaier.
You (simeon.mattes) have been trying out some different solutions (I do believe with and without the --user=mysql option), which probably messed up the permissions on (some of) the mysql files. This being a fresh install you could always decide to uninstall mysql and reinstall it fresh and apply the 4 steps I mentioned in post #4. |
I think I managed to configure it. It seems that it works. Actually I reinstalled mysql through slackpkg after I had removed /var/lib/mysql and I run the steps you have told me.
Though I can't run a .php file in my domain. I get the content of my php file instead. I'll look it out again and if I don't manage to configure it I 'll ask. Thanks. |
Hi,
This: Quote:
Php and apache work closely together, I do believe you need to uncomment a line in your httpd.conf file to "activate" php. Look for these: Quote:
Hope this helps. |
Yes, I know it...I had already done it.
Thanks again |
Thats not all.
If not yet done, you also have to uncomment (remove the leading '#') following line near the end of httpd.conf: Code:
#Include /etc/httpd/mod_php.conf Code:
<IfModule dir_module> Code:
<IfModule dir_module> |
Druuna,
I have run into the same problems that this old thread deals with and your suggestions do not work. Going through the following steps, as you suggest, fail: 1) Install database: mysql_install_db --user=mysql, 2) Start mysql: mysqld_safe --user=mysql 2>&1 >/dev/null &, 3) Set root password: mysqladmin -u root password 'new-password' (or use the mysql_secure_installation command), 4) Stop mysql: mysqladmin -p shutdown (passwd will be asked). Steps 1 & 2 work, it seems. Step 3 bombs with this: error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists! Using mysql_secure_installation it croaks when it asks for the root password. Whether I leave it blank or enter the old password, I get this: Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) Enter current password for root (enter for none): This message from the program is correct: there is no mysql.sock anywhere in the system. I did a fresh install of mysql and it is not being created. I have searched the mysql.org site and there is no help that I could find. The strange thing is that this is an all of a sudden thing. Mysql was working fine, then for no reason that I can determine these problems started. Another thing, it was recommended to run mysql-test-run.pl. Well, I would like to but where is this program available? There is a man page on it but not even the mysql.org site indicates where it can be downloaded. Googling does not help either. Do you have any suggestions? My OS is Slackware 13.1 64bit. |
instructions i followed when i configured LAMP in my Slackware 13.0. might be useful to you.
http://www.linuxquestions.org/questi...12-2-a-693708/ |
Quote:
|
All times are GMT -5. The time now is 06:29 PM. |