View previous topic :: View next topic |
Author |
Message |
Delkaton Tux's lil' helper
Joined: 26 Feb 2004 Posts: 121
|
Posted: Fri Feb 27, 2004 2:30 pm Post subject: Problems with mysql |
|
|
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 |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri Feb 27, 2004 2:41 pm Post subject: |
|
|
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 |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Fri Feb 27, 2004 6:18 pm Post subject: |
|
|
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 |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri Feb 27, 2004 8:17 pm Post subject: |
|
|
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 |
|
|
Delkaton Tux's lil' helper
Joined: 26 Feb 2004 Posts: 121
|
Posted: Fri Feb 27, 2004 10:39 pm Post subject: |
|
|
I know how to do the former but not the latter. Can you give me a help?
Thanks a lot. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Fri Feb 27, 2004 10:41 pm Post subject: |
|
|
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 |
|
|
Delkaton Tux's lil' helper
Joined: 26 Feb 2004 Posts: 121
|
Posted: Fri Feb 27, 2004 10:54 pm Post subject: |
|
|
Yo, thanks a lot. That solved the problem. |
|
Back to top |
|
|
|