Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with mysql
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Delkaton
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2004
Posts: 121

PostPosted: Fri Feb 27, 2004 2:30 pm    Post subject: Problems with mysql Reply with quote

I have just emerged mysql and it told me I souhld run mysql_install_db. So I do. Then it tells me to start mysql (I do) and set up a password for root user using the command

/usr/bin/mysqladmin -u root -h myservername password 'new-password'

But when I do it gives me the following error:

/usr/bin/mysqladmin: connect to server at 'myserverrname' failed
error: 'Lost connection to MySQL server during query'

I have already tried emerging mysql again but it doesn't help. Does anyone knows what should I do?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Fri Feb 27, 2004 2:41 pm    Post subject: Reply with quote

I had a look around and suggest you start reading here.

Several promising links on there, note especially where it says you may also get this error for certain incorrect queries.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Fri Feb 27, 2004 6:18 pm    Post subject: Reply with quote

Recently there was a change made to the my.cnf file so that mysql is bound to 127.0.0.1 aka localhost. If you do a netstat -ptln you can see that. This means that mysql isn't actually running on the IP that is your hostname, which is what is causing the error. You'll need to comment out that line in /etc/mysql/my.cnf or just connect to localhost to reach mysql. I suggest doing the latter for security reasons unless you have some reason to do the former.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Fri Feb 27, 2004 8:17 pm    Post subject: Reply with quote

Hmmm seems I was heading for the difficult way there...
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Delkaton
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2004
Posts: 121

PostPosted: Fri Feb 27, 2004 10:39 pm    Post subject: Reply with quote

I know how to do the former but not the latter. Can you give me a help?

Thanks a lot.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Fri Feb 27, 2004 10:41 pm    Post subject: Reply with quote

from the local box running mysql

mysql -u root -p

You just eliminate the -h host stuff and it'll do the localhost stuff itself.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Delkaton
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2004
Posts: 121

PostPosted: Fri Feb 27, 2004 10:54 pm    Post subject: Reply with quote

Yo, thanks a lot. That solved the problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum