LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2004, 04:26 AM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Problems with MySQL


When I installed Slackware I chosed rc.mysql to be installed and loaded at boot. But every time I start my computer I get the message "mysqld ended". Now I have tried to installed MySQL by my own but now I get this error:

Code:
root@garanka:/usr/local/mysql$ mysql -h garanka -u root -p
Enter password:
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client
I get no errors in /var/log/messages or syslog. What am I doing wrong?

Thanks,
MezzyMeat
 
Old 11-24-2004, 06:56 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Re: Problems with MySQL

Quote:
Originally posted by MezzyMeat
every time I start my computer I get the message "mysqld ended"
i think this can be caused if the owner of the /var/lib/mysql directory isn't mysql, in which case you'd just need to do something like:

Code:
chown -R mysql:mysql /var/lib/mysql
just my two cents...

Last edited by win32sux; 11-24-2004 at 06:57 AM.
 
Old 11-24-2004, 07:10 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
mysql -h garanka -u root -p
Ommit the -h garanka since you are connecting from the same box running mysqld, or use localhost instead.
 
Old 11-24-2004, 07:10 AM   #4
MunterMan
Member
 
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172

Rep: Reputation: 30
Try running it in safe mode, then log in without using the -u or -p option.
First stop it with
/usr/local/bin/mysqld stop

then restart it with
/usr/local/bin/safe_mysql &

If you want log files you have to turn them on yourself, and these do affect performance.
 
Old 11-24-2004, 09:46 AM   #5
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
Thanks for the help, but none of it worked.

I have set the right permissions and still the usual /etc/rc.d/rc.mysqld start gives the text "mysqld ended" and no trace in the syslog.

Here is a lot of tests I did.
Code:
root@garanka:/usr/local/mysql$ mysqld_safe stop        
Starting mysqld daemon with databases from /usr/local/mysql/data
041124 16:37:37  mysqld ended

root@garanka:/usr/local/mysql$ mysqld_safe start
Starting mysqld daemon with databases from /usr/local/mysql/data
041124 16:37:41  mysqld ended

root@garanka:/usr/local/mysql$ /usr/local/mysql/bin/mysqld_safe start &
[1] 8570
root@garanka:/usr/local/mysql$ Starting mysqld daemon with databases from /usr/local/mysql/data
041124 16:37:59  mysqld ended


[1]+  Done                    /usr/local/mysql/bin/mysqld_safe start
root@garanka:/usr/local/mysql$ /usr/local/mysql/bin/mysqld --user=mysql &
[1] 8597
root@garanka:/usr/local/mysql$ 041124 16:38:51  Warning: Asked for 196608 thread stack, but got 126976
041124 16:38:52  InnoDB: Started; log sequence number 0 43634
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.1-alpha-standard'  socket: '/tmp/mysql.sock'  port: 3306

root@garanka:/usr/local/mysql$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
root@garanka:/usr/local/mysql$ mysql -u root -p
Enter password: 
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
root@garanka:/usr/local/mysql$ mysql -h localhost
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
root@garanka:/usr/local/mysql$ mysql -h 127.0.0.1
ERROR 1045: Access denied for user 'root'@'localhost' (using password: NO)
root@garanka:/usr/local/mysql$ mysql -h 127.0.0.1 -u root -p
Enter password: 
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client
So it ended with this auth-thing. And I was thinking about this text "upgrading MySQL client".

I have installed Slackware 10.0 with the option rc.mysqld so therefore I had mysql but it didn't work properly. I have then tried to install the package "mysql-standard-5.0.1-alpha-pc-linux-i686".

It you want to know the dir that I was in when I did those tests was /usr/local/mysql which is a symlink to /usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/ (as it said in the README that I should do).

Last edited by Ephracis; 11-24-2004 at 09:48 AM.
 
Old 11-25-2004, 02:13 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
As you can see from the messages mysql tries to connect through /var/run/mysql/mysql.sock, while when the servers starts opens /tmp/mysql.sock:
Quote:
Version: '5.0.1-alpha-standard' socket: '/tmp/mysql.sock' port: 3306
That's because of the wrong my.cnf file. I guess there is a my.cnf left from slackware's mysql. Since there are 2-3 of them, with /etc/my.cnf beeing the global one try to locate them, delete them except from /etc/my.cnf and then edit that file to point to the correct socket location, either for the daemon (mysqld) and the client (mysql).
 
Old 11-25-2004, 01:11 PM   #7
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
Ok, I found a couple of my-*.cnf but none my.cnf. So I don't know which I will save. Here's what I found:
Code:
/etc/my-small.cnf
/etc/my-medium.cnf
/etc/my-huge.cnf
/etc/my-large.cnf
/usr/local/Install/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-huge.cnf
/usr/local/Install/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-large.cnf
/usr/local/Install/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-medium.cnf
/usr/local/Install/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-small.cnf
/usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-huge.cnf
/usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-large.cnf
/usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-medium.cnf
/usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-small.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-large.cnf
 
Old 11-26-2004, 02:25 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Since you installed mysql in /usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686
Code:
cp /usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-medium.cnf /etc/my.cnf
and edit the lines pointing to mysql.sock both for the daemon (mysqld) and the client (mysql)
 
Old 11-26-2004, 06:20 AM   #9
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
Yeah the socks is working now.
Code:
root@garanka:/home/mezzymeat$ cp usr/local/mysql-standard-5.0.1-alpha-pc-linux-i686/support-files/my-medium.cnf /etc/my.cnf
root@garanka:/home/mezzymeat$ pico /etc/my.cnf
root@garanka:/home/mezzymeat$ /usr/local/mysql/bin/mysqld --user=mysql &
[1] 12011
root@garanka:/home/mezzymeat$ 041126 13:14:32  Warning: Asked for 196608 thread stack, but got 126976
041126 13:14:33  InnoDB: Started; log sequence number 0 43634
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.1-alpha-standard-log'  socket: '/var/run/mysql/mysql.sock'  port: 3306

root@garanka:/home/mezzymeat$ mysql -u root -p
Enter password: 
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client
But as you can see I still have problems with the auth. Just a thought that came up in my mind was that the client is the one installed with Slackware and the server is the package called mysql-standard-5.0.1-alpha-pc-linux-i686. It this the case? It this package *only* the daemon and not the client? Do I have to download a newer client too? I first thought that this package was both the server and the client.
 
Old 11-26-2004, 06:54 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you d/l and installed the binary mysql then the client is already included. It must be in /usr/local/mysql/bin.
Try to run:
Code:
/usr/local/mysql/bin/mysql -u root -p
to see if you can connect
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration