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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-24-2004, 04:26 AM
|
#1
|
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109
Rep:
|
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
|
|
|
11-24-2004, 06:56 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
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.
|
|
|
11-24-2004, 07:10 AM
|
#3
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
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.
|
|
|
11-24-2004, 07:10 AM
|
#4
|
Member
Registered: Nov 2003
Location: The North of England
Distribution: Suse 10.3
Posts: 172
Rep:
|
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.
|
|
|
11-24-2004, 09:46 AM
|
#5
|
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109
Original Poster
Rep:
|
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.
|
|
|
11-25-2004, 02:13 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
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).
|
|
|
11-25-2004, 01:11 PM
|
#7
|
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109
Original Poster
Rep:
|
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
|
|
|
11-26-2004, 02:25 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
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)
|
|
|
11-26-2004, 06:20 AM
|
#9
|
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109
Original Poster
Rep:
|
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.
|
|
|
11-26-2004, 06:54 AM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
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
|
|
|
All times are GMT -5. The time now is 10:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|