2 Replies - 796 Views - Last Post: 05 June 2011 - 04:39 PM

#1 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

Where are mySQL files located on a web server?

Posted 05 June 2011 - 02:37 PM

Hi. i am doing some additions to an existing website, and I need to write some scripts that connect to the existing database, but the owner does not know where the files are, and this is my first time doing this kind of work. I need to find the database files, so I can see the table and attribute names.

I know it is a mySQL database, but that is about it. I have looked through all the folders on the site through FTP, looking for .myd, .myi, innoDB, etc, but have found none. The owner assures me there is a DB on the website, because other parts of the site use it.

Any tips on where to look would be great, Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Where are mySQL files located on a web server?

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4333
  • View blog
  • Posts: 12,128
  • Joined: 18-April 07

Re: Where are mySQL files located on a web server?

Posted 05 June 2011 - 03:07 PM

Well you are not going to find the files in the web directories and thus not found through FTP. But we don't care about the files here. You just need access to the admin tools of the web site's control panel.

Ask the owner for access to their hosts control panel. This should be their login username and password to access their host and in the panel you will find a database icon or option of some kind. Usually the icon or option will kick off phpMyAdmin which you can use for all the database needs from selecting which database to work with, see the tables, modify those tables and everything else.

In code you then just need to access the database using their username and password. Typically this can be done with (in php)...

mysql_connect("localhost","username","password");



From there you can then select the database using mysql_select_db(). But you would use the phpmyadmin through their hosts admin panel to see the database, alter the database, add tables etc and then you can query, insert, update etc through the PHP code.
Was This Post Helpful? 2
  • +
  • -

#3 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

Re: Where are mySQL files located on a web server?

Posted 05 June 2011 - 04:39 PM

Perfect, thank you. I will post again if I run into any more trouble.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1