import mysql database to wamp server - php

I am newbie using php and wamp. I am trying to use a mysql db with the wamp server. I am really confused on what the right steps are. Should I put the sql file in the/www folder or what is the way to go? Thanks a lot

left click wamp -> phpmyadmin
select database then click import (top right)
locate the database and click go.

Via command line: http://www.ibsteam.net/blog/web-development/how-import-sql-file-within-wamp-environment-using-command-line

If you just started I would recommend using phpmyadmin, which comes with wamp. Just run your main localhost www page, select phpmyadmin from there and use import. It's like uploading a file though www, you don't have to place it in any specific directory.

Related

How to import a PHP file to another computer?

I am working on a project with PHP server and I have no previous experience, so I will try to explain myself in the best way!
After I built my website and put the project in the XAMPP folder in order for the PHP browser to run, I had to also download the XAMPP control panel and run APACHE.
My question is how do I give permission to my team to also be able to open the site without downloading XAMPP and to belong to the server I created in PHPmyadmin, do I need an external server? Or is there another way? I would appreciate your help, thank you!

How do I set up a database on PhpStorm?

I am in the process of setting up my development environment and I just need to set up the MySQL Database. I have a .sql file and I'd like to import the information from that into a local database in PhpStorm.
I have the .sql file in my main project folder and I dragged it over to the Database Tool Window and it showed up as a DDL.
My question is: How do I turn that into an actual database that I can run off of localhost?
This is what I see
There is no database in PhpStorm. You need to set up a local server and THEN connect PhpStorm to that database.
If you are a beginner on Windows then you cannot go wrong with XAMPP.
PhpStorm can read the DDL but cannot store any data.
Hope that helps.

Moving wordpress from xampp to xampp

I'm not a programer I just play around html and css. Few weeks ago I was asked to make a Wordpress site for a friend. Thinking that the best idea would be to do it on XAMPP and then move it to live, I worked on it for quite some time.
Just when I was about to finish, something happened with powersurge and my computer got totaled, motherboard, graphics, power, all fried, all except for hard disc that somehow survived.
Now I got a laptop and new XAMPP instalation, but I have no idea how to transfer site from my old Hard disc to new. Any ideas?
Thanks in advance!
Edit: I have moved files from old xampp folder to new, but problem is database.
Usually(default) xampp is installed on the C drive, you can find it at:
C:\xampp\
projects are stored in the htdocs file inside of that, move the project(or projects if you have multiple) in its entirety from the old htdocs file to the new one.
Get your MySQL Data Files from C:\XAMPP\mysql\data and follow the instructions here
You can do this by following this steps:
1) copy your site from c:/xampp/htdocs/[copy your site name folder]
(before just check that your xampp install in which drive. common is C drive).
2)export database from phpmyadmin
type in URL : http://localhost/phpmyadmin/
then select your database and export it.
3)paste your folder in new PC's xampp/htdocs
4)import your database in your new Xampp.
I tried this way and its working good.
Install xammp and wordpress on new computer.
copy wordpress folder from C:\xampp\apps folder
Export wordpress folder from phpmyadmin.
replace the wordpress folder to new system and drop all table from wordpress db and
import the old db datas.
Notes:
If you config or merge other tools like phpbb means you have to change that also to
the new location.

How to make changes to wordpress without them going live immediately?

I am trying to make very quick and easy css changes to a website that is wordpress site. I dont want make them while the site is live. is there a way to make them locally and then upload? what do you recommend?
people tell me that doing it locally is a big hassle because of the way the server is. is there a plug in that will let me make changes without them going live?
Thank you very much in advanced...sorry this is my first time with wordpress
What you can do is the following:
a) Install wamp server on your pc. (google where to get it)
b) Install a version of wordpress locally - in case you already have a version online that want to work on you will have to transfer it locallly. check this: http://codex.wordpress.org/Moving_WordPress
Actually you are saving your wordpress database, download all the files inside your wamp\www folder and then import the database through phpmyadmin to your local wamp server and change a couple of options in the db > options table (there are two options to change the website that is loaded so that it looks locally)
c) Your work on the offline version. I assume you mean that you need only styling, so you can edit your style.css file. As soon as you are pleased with it, you just upload it on your web server replacing your old file!
same as #scooterlord .
You can use nginx and php-cgi too on your Windows if ya wanna move to nginx in future.
Just install wamp then then download Wordpress version and then download your theme or plugin on which ya wanna work.
So ya will able to work offline and its not effect ur website.
yeah. I ya download db from ur site u need to change url of wordpress in DB.
u can do it by using phpmyadmin.
or by using These lines in your themes function file.:
update_option('siteurl','http://your.site.url:port/yourblog');
update_option('home','http://your.site.url:port/yourblog');

not able to update sqlite3 database from PHP page

I have installed PAW server in my android board. In PAW server I have added plug-in PHP. from there I am able to open my all php pages.
BUT the problem is I am not able to do INSERT and UPDATE query to my SQlite3 database.
Do not know what is wrong with that..
Anybody can please help me out.
I'm using phpLiteAdmin together with PAW on a daily basis.
So you can try to install phpLiteAdmin just to check if your setup is working.
Ensure that the folder where the SQLite3 database was placed as well as the file have write permissions. Your SELECT statement will work fine but INSERT and UPDATE cannot write to the database.
I also found a link of how you can install/verify the PAW PHP runtime: http://fun2code-blog.blogspot.com/2012/03/paw-runtime-php.html.
Also, have a look at this post I found explaining step by step how to run sqlite from your phone using the correct permissions: http://code.google.com/p/phpliteadmin/issues/detail?id=66

Categories