Jump to content

MySQL, XAMPP server and Navicat


kigroy

Recommended Posts

Using Navicat I want to create and manage my MySQL Database.  Where in XAMPP do I store the database?  The localhost file path is C:\xampp\htdocs\ and then i have a folder in there called test. 

 

As it seems to me now it will be stored in the mysql data folder of xampp (C:\xampp\mysql\data).  Do I really link my test site to the database in this fashion? or should I force Navicat to work in the C:\xampp\htdocs\test folder where I will have all my other document for the server?

 

Thanks!

Link to comment
Share on other sites

I don't think you understand how MySQL works x.x.  Think of it for this example as a web server.  Your scripts connect to it and ask it for data, and then it sends back data.  It runs as a server (daemon or what ever you want to call it).  You should never need to access the data files directly.  (Except for backing or or something, unless you have the file format of MySQL files memorized.)

Link to comment
Share on other sites

So if I write a script in php and save it in C:\xampp\htdocs\ (the localhost folder), and it queries database_X, which is saved in C:\xampp\mysql\data folder (default MySQL folder), and then later upload everything into their respective locations on to my webhost server all the links and filepaths will work?

Link to comment
Share on other sites

Ok, so will the php scripts query the MySQL database on my local server just like they will on my website server using the paradigm described? 

If you are developing your PHP script locally which uses a MySQL database. Then you'll need to backu[ your database on your local server and then import your database to your remote MySQL server. You do not access the files stored in C:\xampp\mysql\data. You'll have to either use the Command Line or use something like phpMyAdmin (this is easiest) to perform your backup.

Link to comment
Share on other sites

Ok I'm confused. 

 

What I would like to do:

Create a database and supporting tables in Navicat (similar to phpMyAdmin) on my local server (XAMPP).  And I want to write php scripts and html documents and save them on my local server so I can not only test them, but use them to add information to my tables in my database that is also on my local server, and then when I'm satisifed with the look, feel and usability of my site that I've developed locally, I want to upload the entire site to my remote server, databases and all.  I do know how to import databases into my remote server, and I know how to ftp files to my remote server, but when creating the databases and php and html files locally, do I store the files in:

 

for php and html docs:

C:\xampp\htdocs\ (the localhost folder)

 

and for the database:

C:\xampp\mysql\data (where phpMyAdmin woud go to create and manage mysql databases)?

 

and if I do store the files and databases in their respective folders, and upload them later to my remote server will I have any issues?

 

Thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.