VKontakte.DJ
forum traveling
 

Celestial Software

...better by design

Home Support SSH Client Forums
Welcome, Guest
Please Login or Register.    Lost Password?
coneccting to mysql (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: coneccting to mysql
#1259
coneccting to mysql 16 Years, 3 Months ago  
I am having a problem connecting to mysql on my hosting company’s Linux hosting server. I need you help.



I have installed the trial of Absolute Telnet 3.13 I have gotten the following info from my Hosting company who says they support telnet with ssh

Below if the mysql config file that resides on the Linux server. This was given to me by my hosting company.



I don’t know what to use when inputting info in to quick connect on your program. I have put into



Protocal: ssh1

Hostname: localhost

Port: 4429

User name: The username that they gave me

Cipher 3DES

Authentication: Password



A dialog box comes up and tells me “Connect Failed. Winsock error: Connection refused

************************

This is the info that I get from my hosting company.



Thank you for hosting with AIT.

In reviewing this matter I understand that you are running an application which connects to mysql. I understand that you have some questions below.

It will let me connect to mysql through ither direct connection, DLL or php tun
nel. Do you support any of these or must I use telnet only.

You can connect to either mysql via graphic user interface or you can connect via php however you will be able to connect using a DLL.

What is the server name to the database? The server name to the database is localhost.
What port do I use? I assume the username and password is my server username and password? your port number is 4429 and y! ou do not need a username and password in order to connect to mysql.

Do you permit mySQL login via SSH. Yes we do permit mysql login via ssh all you would need is the key create for ssh and once we install it you will have access.





# Example mysql config file.

# You can copy this to one of:

# /usr/local/mysql-3.22.32/etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options (in this

# installation this directory is /usr/local/mysql-3.22.32/var) or

# ~/.my.cnf to set user-specific options.

#

# One can use all long options that the program supports.

# Run the program with --help to get a list of available options



# This will be passed to all mysql clients

[client]

#password = my_password

user = business

port = 4429

socket = /vs2/business/tmp/mysql.sock



# Here is entries for some specific programs

# The following values assume you have at least 32M ram



# The MySQL server

[mysqld]

user = business

port = 4429

socket = /vs2/business/tmp/mysql.sock

tmpdir = /vs2/business/tmp

basedir = /vs2/business/usr/local/mysql/



skip-locking

set-variable = key_buffer=16M

set-variable = max_allowed_packet=1M

set-variable = thread_stack=128K

# Start logging

log



[mysqldump]

quick

set-variable = max_allowed_packet=16M



[mysql]

no-auto-rehash



[isamchk]

set-variable = key_buffer=16M

[ August 13, 2004, 01:04 AM: Message edited by: Brian T. Pence ]
mysqlguy (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1260
Re: coneccting to mysql 16 Years, 3 Months ago  
I think you're getting confused between your SSH connection and your MYSQL connection. AbsoluteTelnet will get you a shell-level connection via SSH, and can even provide SSH port forwarding for allowing you to tunnel your MYSQL connection. However, you have to get all of your connectivity straight.

First, the SSH connection....

'localhost' always resolves to YOUR OWN IP address. Connecting to localhost will not do you any good unless you are running a SSH server or MYSQL server on your own box. You might also use 'localhost' when setting up port forwarding (if you need it). There is certainly another host name to use when connecting via SSH2.

Port 4429 is the MYSQL port number, for MYSQL apps connecting to a MYSQL database. This port is NOT to be used when setting up the SSH2 client connection. The default port for SSH2 connection is 22.

As for authentication for SSH2, however, they may require a different login for shell level login than for your MYSQL database login. Leaving MySql out of it for the moment, try connecting to your server with the SSH2 protocol, port 22 using the username & password you have. If this doesn't work, ask your admins 'how do I connect using SSH2??' One thing their message said: "Yes we do permit mysql login via ssh all you would need is the key create for ssh and once we install it you will have access" indicates to me that they will only allow SSH2 access via public key authentication. You have to generate a public/private key pair. Keep the private key for logging in via the client and send the public key to them. This authentication is done for the SSH connection instead of username/password. You can do this in AbsoluteTelnet. When you try to connect via SSH2, you are prompted for a username. On this dialog, there is an option for logging in via public key authentication, and there is a button for generating the key pair. Generate the keys (once) and send the public key to your server admins.

Once you are successfully logged in via SSH2, we can talk about the MYSQL connection, but first I'd have to know where the client and server programs are located in relation to each other.
bpence (Admin)
Admin
Posts: 1343
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
#1261
Re: coneccting to mysql 16 Years, 3 Months ago  
You are right I am confused about mysql since this is my first stab at it. I have tried to understand how to connect to mysql and and having trouble understanding the terms and what I have to do first. It seems all I am going to get from my Hosting company is the info I gave you in my first post. Do I need to use ssh to connect ot mysql.

IF you have a good totuorial on the subject that a novice to mysql would understand I would appreciate it. I need to get to mysql servser to creat a database so I can access it with PHP. I have tried php scripts to access the server but everything I have done has done nothing but frustrate me more. Help.
mysqlguy (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1262
Re: coneccting to mysql 16 Years, 3 Months ago  
Some links to start coding with MySQL, PHP and Apache:

1) MySQL homepage: http://www.mysql.com and http://dev.mysql.com/
2) A PHP/MySQL tutorial from Webmonkey: webmonkey.wired.com/webmonkey/programmin...rials/tutorial4.html
Several others are available by googling the Internet for "mysql php tutorial".
3) PHP homepage: http://www.php.net
4) If you are serious in development, I suggest a look at some of the books published by O'Rielly on topics such as PHP, Apache and MySQL. Search Amazon.com for books.

Some suggestions:
1) teach yourself by starting on a "dummy" project (for example a database of you CD collection, web-links etc.). Add all the stuff you need for a "real" project, for example - user authentication, record editing, adding records etc. etc.
2) If possible, install the development environment on your local system. Apache, PHP and MySQL runs perfectly fine on a Windows 2000/XP machine.
3) Learn SQL-92 syntax!!! You could use a GUI to setup the tables etc, but you will need to know SQL syntax anyway when you do your quiries to the database. Look at http://dev.mysql.com/downloads/ under "Graphical Clients" on that page. Personally, I do everything from the mysql-prompt, but you may do the actual setup of the database with a GUI.

Good luck and happy coding!
/msa

[ August 13, 2004, 05:17 AM: Message edited by: Mattias Sandstrom ]
msa (User)
Expert Boarder
Posts: 124
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#1263
Re: coneccting to mysql 16 Years, 3 Months ago  
And in case I didn't say it clearly enough... You do NOT use AbsoluteTelnet(an SSH client) to connect to a MYSQL database. You *may* use AbsoluteTelnet to connect to the server that *hosts* your MSQL database, but what you will get is a command prompt (like a DOS prompt) where you will do the work of setting up your MYSQl database.
bpence (Admin)
Admin
Posts: 1343
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
Go to top