Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Learning MySQL, where is the database?

MySQL mysql

  • Please log in to reply
8 replies to this topic

#1 CriticalError

CriticalError

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 185 posts

Posted 06 October 2012 - 12:02 PM

I am learning MySQL and using the command line to create / edit databases now it says the database is in the data folder in the program installation directory but what file extension does it have at the end? And how would I upload something like this to be host..?
  • 0

#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 06 October 2012 - 12:27 PM

Are you familiar with the my.ini file ?

Here is an explanation of mysql database physical files location

Be known you might not be able to work it as a file while the mysql engine is running
  • 0

#3 CriticalError

CriticalError

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 185 posts

Posted 06 October 2012 - 01:44 PM

what kind of file is it? What extension?
  • 0

#4 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 07 October 2012 - 01:07 AM

You shouln't need to care about the mysql files as long as the software is installed and running. You work in a client, command line based or graphical one,do do what you want.

Easiest is to get a graphical client like HeidiSQL or MySQLs own MySQL Workbench
There are more, but those are pretty good. And free.
If you will be working with developing web applications, I suggest you get PhpMyAdmin to handle the database.
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#5 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 07 October 2012 - 03:13 AM

The file formats mysql use are proprietary format, i think i remember them being called innoDB or something very similar, my memory blurs at that point, and about the extension, here is some of what you kind find in your disk:

the *.myd files is where the data is stored.
the *.myi files are indexes.
The *.frm files has table definitions.
  • 0

#6 CriticalError

CriticalError

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 185 posts

Posted 07 October 2012 - 03:20 AM

I am just confused, say I made a data-driven website, I just don't understand how I would upload the database..
  • 0

#7 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 07 October 2012 - 05:41 AM

you don't upload database content by file, you export your database as queries and import them in your online database. you don't touch the files unless you're an database engine expert...
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#8 CriticalError

CriticalError

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 185 posts

Posted 07 October 2012 - 07:04 AM

Yeah I think I understand now, I installed PHP myAdmin and clicked on export and I got this file out of it in sql format
CREATE TABLE IF NOT EXISTS `prints` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `price` decimal(6,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `prints`
--
INSERT INTO `prints` (`id`, `name`, `price`) VALUES
(1, 'Merry Structure', '30'),
(2, 'Heavy Red', '25'),
(3, 'Black Lines', '46');

Before you ask what I was doing I am reading this book >http://www.amazon.co...49622173&sr=8-1

You see my site is programmed in asp.net and I use WebMatrix which uses a simple compact database in sdf format a very simply file type database like Microsoft Access, so this all is getting quite confusing, but I guess that file I would upload to my host and import it into phpMyAdmin.. correct?
  • 0

#9 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 07 October 2012 - 09:50 AM

yes, exactly!
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download