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.
Related
I recently created an Ubuntu Virtual Machine in VirtualBox to create a new project.
So now I created my database in phpmyadmin and I wanted to export my database to keep the data.
The thing is that when I try to export it it throws an error that says that the database couldnt be exported because the origin file couldnt be read.
It may be a php configuration problem (php.ini)? or maybe I created the virtual machine on a wrong way?
Thank you in advance.
For security, if you want to save a database, do a dump on the server directly.
You can take a look to this link : https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb
phpmyadmin is good to have something more visual for an human and manage some little changes. But it's not enough secure to be publish on internet. Becareful about that.
I am trying to import a local drupal site from a git repository.
I am using Acquia Dev Desktop2.
I keep getting this error and I was hoping if anyone has experienced this before and has a solution:
Any help would be greatly appreciated.
It is a database issue. Are you importing a database? Check your settings.php file and ensure that they point to a valid database, then, if you don't need to have any data to start with I would suggest ensuring that the database is empty (no tables) and then do a site install via the UI or whatever.
If you are intending to import a database then it looks like the database you've got is corrupt or incomplete.
I have a question regarding how to set up local and production versions of a WordPress website that uses, PHP an MySQL.
I want to have these two versions (local and production) use different databases because we can test.
I will be using git to push my changes up to the server.
I have MySQL installed locally, and a webserver set up locally, but I don't know of a way to push mysql changes to the server and keep it connected with with git.
I will be working with several others so it needs to be using git for the database.
How would I go about doing this?
Thank you for any help!
You can dump the scheme and/or the data to a file and then check that file into git.
For example, this will dump the table schema and data to a file named [table_name].sql
mysqldump --user=[user_name] -p --opt [local_database_name] [table_name] > [table_name].sql
To load this data in production, you would do something like this:
mysql --user=[user_name] -p [server_database_name] < [table_name].sql
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.
I am a beginner to Joomla, I have installed Joomla 1.5 in my server with Fantastico including sample data, also i have installed joomla in my local server. I Don't know how to upload this project from local to real server, when i completed my project , i have exported my database and import this Database in to real server after deleting all tables from real data base. But everyday this database data automatically changed to old sample data? I don't know how to fix this problem. Please any one help me!!!!!!!!
I've never used Fantastico to install Joomla, but:
To copy a Joomla installation from a server to another you'll need to:
Copy the content of your webroot (be careful about permissions)
Adjust the config parameters from the config.php or through the admin panel
Dump the database from the old website and import it into the new one.
My feeling is that you're trying to "install" Joomla again on the real server, and during the installation you're confirming the creation of the sample data (this will override the existing tables).
Are you sure you're using the right database name in your real server? Maybe you have two or more...