Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd January 2007, 02:45
kuriharu kuriharu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'How to connect to MySQL using PuTTy' doesn't work

I followed the instructions to a T, but it doesn't work. I have it set so root can't connect to anything but localhost and it still doesn't work. I've tried the internal IP, 127.0.0.1, localhost, etc, but no dice.

Oh well, it seemed like a cool idea at the time.
Reply With Quote
Sponsored Links
  #2  
Old 3rd January 2007, 19:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

What's the output of
Code:
netstat -tap
and
Code:
ps aux|grep -i mysql
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd January 2007, 19:55
kuriharu kuriharu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default ps aux won't work -- On Windows

Thanks for getting back to me, Falco.

ps aux won't work, as I'm running PuTTy and MySQL admin on Windows.

I managed to get it to work partially -- I created a "Grant all on *.* to 'root'@'localhost.localdomain'; on the MySQL server, and now I can log in with a blank password using this method. Being on the server still requires the root password to access MySQL, so I'm not too worried about security for the moment. For some reason, adding a password to root@localhost.localdomain didn't work -- it still logs me in with a blank password.

When MySQL admin does run, however, it lets me see my databases but I can't change anything. I get an error that says "Either the server service or the configuration file could not be found. Startup variables and server are therefore disabled." I haven't Googled this one, yet.

Thanks again for getting back to me.
Reply With Quote
  #4  
Old 3rd January 2007, 19:57
kuriharu kuriharu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sorry, I meant "Falko". My bad!

I was so happy to get a reply I forgot to spell your name properly. Sorry.
Reply With Quote
  #5  
Old 4th January 2007, 16:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Quote:
Originally Posted by kuriharu
ps aux won't work, as I'm running PuTTy and MySQL admin on Windows.
But your MySQL server is running on Linux, isn't it? Then connect to your Linux system with PuTTY (port 22 - SSH) and run
Code:
netstat -tap
and
Code:
ps aux|grep -i mysql
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 4th January 2007, 18:27
kuriharu kuriharu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Oh yeah. Whoops!

Thanks for getting back to me.

Here is the output of netstat -tap:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:wnn6 *:* LISTEN 1982/jserver
tcp 0 0 *:swat *:* LISTEN 1987/inetd
tcp 0 0 *:mysql *:* LISTEN 2040/mysqld
tcp 0 0 *:netbios-ssn *:* LISTEN 2088/smbd
tcp 0 0 *op3 *:* LISTEN 1987/inetd
tcp 0 0 localhost.localdo:spamd *:* LISTEN 1934/spamd.pid
tcp 0 0 *:sunrpc *:* LISTEN 1626/portmap
tcp 0 0 *:www *:* LISTEN 16742/apache2
tcp 0 0 *:canna *:* LISTEN 1946/cannaserver
tcp 0 0 *:auth *:* LISTEN 1987/inetd
tcp 0 0 *:munin *:* LISTEN 2128/munin-node
tcp 0 0 *:ftp *:* LISTEN 1987/inetd
tcp 0 0 *:ssh *:* LISTEN 2103/sshd
tcp 0 0 localhost.localdom:smtp *:* LISTEN 1977/exim4
tcp 0 0 mail.<name withheld>:smtp *:* LISTEN 1977/exim4
tcp 0 0 *:https *:* LISTEN 16742/apache2
tcp 0 0 *:2812 *:* LISTEN 29878/monit
tcp 0 0 *:microsoft-ds *:* LISTEN 2088/smbd
tcp 0 0 mail.<name withheld>op3 mail.<name withheld>:2260 TIME_WAIT -
tcp 0 0 mail.<name withheld>:mysql mail.<name withheld>:40330 ESTABLISHED2040/mysqld
tcp 0 0 mail.<name withheld>:mysql mail.<name withheld>:40331 TIME_WAIT -
tcp 0 0 mail.<name withheld>:www lj602239.inktomis:44796 TIME_WAIT -
tcp 0 52 mail.<name withheld>:ssh mail.<name withheld>:2828 ESTABLISHED3900/sshd: <name withheld> [
tcp 0 0 mail.<name withheld>:40330 mail.<name withheld>:mysql ESTABLISHED3903/0

Here is the output for ps aux| grep -i mysql

root 2006 0.0 0.3 2508 1236 ? S Jan01 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 2040 0.0 5.7 119640 18636 ? S Jan01 0:02 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root 2041 0.0 0.1 1488 500 ? S Jan01 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root 4296 0.0 0.1 1552 528 pts/0 S+ 08:13 0:00 grep -i mysql
Reply With Quote
  #7  
Old 5th January 2007, 17:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Looks ok.
What's the output of
Code:
mysql -h localhost -u root -p
and
Code:
mysql -h 127.0.0.1 -u root -p
?
What's the output of
Code:
ifconfig
and what's in /etc/hosts?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 8th January 2007, 18:57
kuriharu kuriharu is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Here you go:

The first two worked fine with my regular root password for MySQL

Ifconfig:
--------------------------
eth0 Link encap:Ethernet HWaddr 00:50A:7C:1F:06
inet addr:192.168.X.XXX Bcast:192.168.X.XXX Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:883347 errors:0 dropped:0 overruns:0 frame:0
TX packets:350871 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:354650083 (338.2 MiB) TX bytes:95787104 (91.3 MiB)
Interrupt:5 Base address:0x1000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:670953 errors:0 dropped:0 overruns:0 frame:0
TX packets:670953 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:75728099 (72.2 MiB) TX bytes:75728099 (72.2 MiB)


In /etc/hosts, this is what I have:
----------------------------
192.168.X.XXX <local machine name>
127.0.0.1 localhost.localdomain localhost

192.168.X.XXX <one Windows PC>
192.168.X.XXX <Another Windows PC>

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Reply With Quote
  #9  
Old 9th January 2007, 16:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

This looks fine, so the tutorial should work. Please compare your settings again with those from the tutorial.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 16th October 2007, 02:02
spineb spineb is offline
Junior Member
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Issues making connection as with certain hosts

Hi falko,

I too followed the instructions in the 'How to connect to MySQL using PuTTy' tutorial and can not get the connection to work.

The problem has something to do with my hosting provider as I was able to make a successful connection to my dedicated server.

When I tried to connect to my shared hosting DB I receive "MySQL Error Number 2013. Lost connection to MySQL server during query".

What I'm wondering is if there is anyway to specify what host name I want to connect to on the remote server as each database on my hosted server has its own unique Host Name.

Thanks for any incite.

-Bryan
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 18:58
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 17:33
Email seemingly not working... Duplex Installation/Configuration 11 19th April 2006 15:48
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 12:30
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04


All times are GMT +2. The time now is 20:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.