View Full Version : Need help connecting to MySQL
GoldenEagle
02-18-2005, 04:28 AM
I have a website through 1&1. I tried connecting to mySQL using SSH, but it will not allow me since my package does not allow it (bull shittish if you ask me). Anyway, I have no clue how to connect to it since I can not do that. Has anyone used 1&1 before and can tell me how to connect to it?
mhhh, doesn't ssh only connects you to a server (like any shell). Then you would connect to mySQL.
Anyway, what do you want to do with your mySQL database ?
If it's just create tables and such, using phpMyadmin works like a charm (and I assume your provider allows php, otherwise I don't see the use of mySQL)
Danny
02-18-2005, 04:41 AM
Since you can't use SSH, you can install phpmyadmin to work with your mysql databases.
Danny
02-18-2005, 04:41 AM
Alf, a lot of hosts don't provide shell access, and I was guessing that is what he was saying.
As Alf said, use phpmyadmin that as it's name says, it's a mysql admin interface made in php. Using it it's so easy to create databases, tables, asign users, run sql queries etc. It is also so easy to install, just upload it all by ftp and edit the config file for your server info.
You can download it here and it's free:
http://www.phpmyadmin.net
About your post, if you have a shell acount and ssh access, at the linux prompt just type mysql and it will ask you for user/pass to connect to mysql, then you can run all kind of mysql commands supossing you have enought rights.
As i suposse you're doing this for your project and the new FOF-FBCB website, fell free to contact me if you need any help. I'll be online using ICQ and AIM later today, like in 4 hours.
Danny, I just re-read and it appears ssh is not enabled of course (like many providers). My bad, I read too quickly.
So GE : phpMyadmin is compulsory if you want to do anything on your MySQL database. I might help you this time :)
GoldenEagle
02-18-2005, 05:03 AM
The SSH shell is only offered to users with a higher package. I am checking out phpMAdmin right now. I am use to this damn command prompt though. :)
You can use all the prompt commands in phpadmin too, then click on a button and the command will be run, you will like phpmyadmin for sure, it can be used to do it with some clicks if you don't know a lot of mysql but also allows you to use any kind of stuff you usually do at prompt too if you're skilled in mysql. It can even generate the php code to run the queries you want so you only need to copy/paste that php code in your script. It can also generate exports of the tables to .csv or .txt files etc. I really love it :)
Icy : how do you get the command line from phpmyadmin ? Not that I would use it since I have a ssh access to my host, but for my information.
OK, I see. Nothing new there in fact for me :)
Alf, maybe my poor english confused you :)
It's not that you get a command prompt, but that using a form, you can write and execute all the mysql commands that you could run at prompt.
To do it, you need to click on the SQL icon at the left top, just over the select box where you choose the database to work with. Then it pops up a text box where you can enter any mysql command, under that there is a button to Continue and run the command. This SQL tab at the top hasn't ever been there i think, i saw it when i upgraded phpmyadmin to the latest version, not on the earlier ones but maybe i was not paying enought atention before.
EDIT:
From the help docs:
From the Database Administration Screen, you can run queries against your database by typing "raw" MySQL select statements directly into the Run SQL Query/Queries box. This query box should only be used if you know how to write queries manually.
In fact, the same box can be used to run almost any "raw" MySQL statement without needing to establish a direct Encrypted Telnet (SSH) connection with the MySQL server
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.