How do I connect to a MySQL database using Telnet?
Print Email
Email this article
Close
Email this article
CloseYou are here: Home > Website Support > MySQL
To connect to your MYSQL database via telnet:
- From the Windows Start Menu, select ‘Run’
- Type ‘cmd’ and click ‘Run’
- At the command prompt (C:\) type the following: telnet yourdomainname [enter] , for example, C:\ telnet hetzner.co.za
- Connect to your Hetzner account.
- When prompted, enter your ftp username and password. Note:no characters will be displayed when the password is typed; do not use backspace when an error in the password is made). The display will appear, for example, Last login: Wed Aug 8 14:33:02 from nld-dial-196-7-200-205.mweb.co.za username@server username]$
- Connect to the database via MySQL. This involves the insertion of the UserID and Password given specifically for MySQL use. This information will have been provided to you subsequent to the creation of a database on your Basic Account or higher. A selection of three database UserID’s and accompanying Passwords will be available with each MySQL database at Hetzner: Read-Only UserID: grants access to select (read) only Read/Write UserID: grants access to select, insert and update (no deleting capabilities) Full-Access UserID: grants access to select, insert, update and delete Example: [trial@server trial]$ mysql -h hostname -u UserID -p databasename (where hostname = the Hetzner MySQL server name) (where databasename = name of your database corresponding with the UserID specified above)
- The user will then be prompted for a Password, as prompted by -p (i.e. the accompanying Password for the UserID specified above)
- Enter password
- You will now see output similar to the following: Welcome to the MySQL monitor. Commands end with ; or \g Your MySQL connection ID is 62863 to server version: 3.23.32
- Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer
- mysql> Note: If an error message pertaining to ‘Access denied’ is the result of connection attempts, you should consult the MySQL documentation included with the software, the MySQL mailing list (http://www.mysql.com) .
- You are now connected to the database and free to execute various commands of the MySQL language. Important Note: Almost all commands in MySQL are followed by a semi-colon (;). Where applicable, remember to end each command line with a semi-colon (;) before pressing enter. There are a number of administrative commands at your disposal. These commands can be viewed simply by typing help, \h or ? at the command line:
- mysql> help
Was this information helpful?
Yes NoThank you for your feedback
We are delighted to find that our article resolved your query.
Thank you for your feedback
We will resolve your query as soon as possible.
Please take a few moments to comment on your unresolved query. Simply tell us what your problem is. We guarantee that we'll get back to you within two hours (during office hours) in response to your query.
