SlackwareThis Forum is for the discussion of Slackware 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.
bash-4.1# /etc/rc.d/rc.mysqld start
bash-4.1# 110825 10:28:37 mysqld_safe Logging to '/var/lib/mysql/lenovo.err'.
110825 10:28:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110825 10:28:38 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
bash-4.1# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
The 'long' of it:
I down loaded and installed XAMPP from www.apachefriends.org in my attempt to set up LAMP so that I could then attempt to install Drupal 7.7.
I get the same error msg whether I use my root password or no password at all.
I might be mistaken but mysql is all ready installed in the full version of slackware and there is no need for third parties....
I am running mysql in my system along with gallery3 and I did not had to install any pkgs. PhP and perl where also there.
Just for clarification have you confirmed mysql running or not?
Sorry, I am so confused now and have tried so many commands, I just don't know.
What command will tell me if mysql is actually running?
I also get this:
Code:
bash-4.1# /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.4...
XAMPP: Another web server daemon is already running.
XAMPP: XAMPP-MySQL is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.
Thanks,
Last edited by Robert.Thompson; 08-25-2011 at 10:36 AM.
Sorry, I am so confused now and have tried so many commands, I just don't know.
What command will tell me if mysql is actually running?
Thanks,
Different options....
mysqladmin -u root -p status
You should see:
Enter password:
Uptime: 4 Threads: 1 Questions: 62 Slow queries: 0 Opens: 51 Flush tables: 1 Open tables: 45 Queries per second avg: 15.500
If you dont see that and see:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Than is not running but from the look of your post it looks like is not running....
Enter password:
Uptime: 4 Threads: 1 Questions: 62 Slow queries: 0 Opens: 51 Flush tables: 1 Open tables: 45 Queries per second avg: 15.500
If you dont see that and see:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Than is not running but from the look of your post it looks like is not running....
Another way is:
ps aux|grep mysql
You should see mysql as a process running
Thanks SeRi@lDiE, I get this:
Code:
bash-4.1# mysqladmin -u root -p status
Enter password:
mysqladmin: connect to server at 'localhost' failed
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!
bash-4.1# ps aux|grep mysql
root 7121 0.0 0.0 2648 1252 pts/2 S 11:32 0:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/mysql/lenovo.pid
nobody 7483 0.0 0.8 177596 25672 pts/2 Sl 11:32 0:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/mysql/plugin --user=nobody --log-error=/opt/lampp/var/mysql/lenovo.err --pid-file=/opt/lampp/var/mysql/lenovo.pid --socket=/opt/lampp/var/mysql/mysql.sock --port=3306
root 7778 0.0 0.0 2020 508 pts/2 S+ 11:37 0:00 grep mysql
bash-4.1#
But XAMPP says that it is running!
Last edited by Robert.Thompson; 08-25-2011 at 10:47 AM.
bash-4.1# mysqladmin -u root -p status
Enter password:
mysqladmin: connect to server at 'localhost' failed
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!
bash-4.1# ps aux|grep mysql
root 7121 0.0 0.0 2648 1252 pts/2 S 11:32 0:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/mysql/lenovo.pid
nobody 7483 0.0 0.8 177596 25672 pts/2 Sl 11:32 0:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/mysql/plugin --user=nobody --log-error=/opt/lampp/var/mysql/lenovo.err --pid-file=/opt/lampp/var/mysql/lenovo.pid --socket=/opt/lampp/var/mysql/mysql.sock --port=3306
root 7778 0.0 0.0 2020 508 pts/2 S+ 11:37 0:00 grep mysql
bash-4.1#
Robert,
Looks like your XAMPP installation might have cause some issues.
To me it looks like mysql is running using the xampp version and when you are trying to execute the rc.mysql it looks for the local mysql as you can see its looking for the socket under /var/run/mysql/mysql.sock which is the default path for the mysql socket under slackware.... You will have to modify the start script to look at your xampp verssion... or you can ignore the start up script and add to your path /opt/the/xampp/version/ and create your own start up script.
My 2 centavos:
Start all over again and use the slackware version of mysql.
Looks like your XAMPP installation might have cause some issues.
To me it looks like mysql is running using the xampp version and when you are trying to execute the rc.mysql it looks for the local socket under /var/run/mysql/mysql.sock which is the default path for the mysql socket under slackware.... You will have to modify the start script to look at your xampp verssion... or you can ignore the start up script and add to your path /opt/the/xampp/version/ and create your own start up script.
Thanks SeRi@lDiE.
In anticipation of screwing things up, I made a complete backup of my fresh Slackware 13.37 install before messing around with XAMPP, so, I'm going to format /dev/sda1 (root) and reinstall.
In anticipation of screwing things up, I made a complete backup of my fresh Slackware 13.37 install before messing around with XAMPP, so, I'm going to format /dev/sda1 (root) and reinstall.
Then I'll try again.
Robert,
You dont have to format... You can just remove the xampp version... Just look at where the files are located... It seem they are in opt.
reformatting is a bit drastic no?
I had a similar problem after installing Slackware. MySQL just wouldn't start. The MySQL log files also were not very helpful. And then I discovered the comments at the start of /etc/rc.d/rc.mysqld:
Code:
# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# ...
Maybe running mysql_install_db does the job for you also.
I had a similar problem after installing Slackware. MySQL just wouldn't start. The MySQL log files also were not very helpful. And then I discovered the comments at the start of /etc/rc.d/rc.mysqld:
Code:
# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# ...
Maybe running mysql_install_db does the job for you also.
While you are right I can see that mysql is running in hess output...
I think hess problem is that he is running a different mysql version on a different path so while mysql is running he is trying to call and execute mysql from the local install instead of the third party making mysql error out... He could continue to use the xmpp version all he has to do is add it to hess path but than he will have to modify start up scripts to look at the correct mysql version, etc...
You dont have to format... You can just remove the xampp version... Just look at where the files are located... It seem they are in opt.
reformatting is a bit drastic no?
Hi SeRi@lDiE:
Drastic? Well, maybe...
You see, I really don't know what I am doing a lot of the time. In the past 2 days I have issued many commands and edited many config files in my attempt to get things set up to install Drupal. God only knows what I have done to my fresh Slackware installation.
So, before I started down this road, I did a fresh DVD install and then added the software that I had successfully installed before. Then I used clonezilla to make image back ups of root and home. (all my data is living in a separate partition and in Dropbox)
Now, I can format to clobber everything that I have screwed up, reinstall my back up and know that I have a clean starting point.
I guess you could call this a Newbie's approach to installing software in Slackware.
You see, I really don't know what I am doing a lot of the time. In the past 2 days I have issued many commands and edited many config files in my attempt to get things set up to install Drupal. God only knows what I have done to my fresh Slackware installation.
So, before I started down this road, I did a fresh DVD install and then added the software that I had successfully installed before. Then I used clonezilla to make image back ups of root and home. (all my data is living in a separate partition and in Dropbox)
Now, I can format to clobber everything that I have screwed up, reinstall my back up and know that I have a clean starting point.
I guess you could call this a Newbie's approach to installing software in Slackware.
Ah what a beautiful tool... Clonezilla.
I dont know where I be if clonezilla didn't exist
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.