Now on Google App Engine you can download kinds to localhost dev server via appcfg command, is there any way to download Text Search indexes to localhost dev server for local test and debug?
Thanks.
Not at the moment, sorry. It wouldn't be too hard to write an app that does this, but we don't have a tool for it yet.
Related
I have a local PostgreSQL Database for my Discord Bot on my PC and want to update to my Heroku Application. I have added the Heroku Postgres Addon, but don't know how to upload the Database. I can't use the Amazon Web Services as told in the devcenter since i don't have any Credit Card. Is there any way to upload the Database without AWS? Thank You and sorry for my bad English
You can dump your local database contents to a SQL file with pgdump. Then you can access your Heroku database from your local machine and upload your SQL using the psql command-line client. Get the access url like this from the Heroku command and put it into your client program.
heroku config | grep HEROKU_POSTGRESQL
Know this: sometimes Heroku migrates your data from one host machine to another. When they do that they change your access url. So retrieve that url again whenever you use the psql client.
I am very well known for site deployment on Heroku server. But I only see how much memory used in my server. I can not see my files.
I have just started with google appengine. I am developing an app in php. If I wanted to see the result, I used
dev_appserver.py ./ --php_executable_path /usr/bin/php5-cgi
(It doesn't work without the --php_executable_path parameter for me)
It works fine, except I cannot connect to the cloud sql instance. I read this https://cloud.google.com/appengine/docs/php/cloud-sql and tried to connect to the cloud sql by:
$sql = new mysqli(null,
'root', // username
'', // password
,
null,
'/cloudsql/:'
);
If I deploy something to appengine, this works, but what should I do, if I need to debug the app localy and it depends on the database?
#DTing's answer is correct that Google's docs encourage you to use a local MySQL from the local development server and recommend that pattern.
However, if you disagree and want to run the development server against your "production" SQL in the cloud, that's supported, too (just not encouraged because a bug during development could destroy your production data!).
Specifically, you follow the general instructions at, and pointed to by, https://cloud.google.com/sql/docs/getting-started#work (ignoring the appengine-specific part): make sure your Cloud SQL instance has an IP address, enable the outside-visible IP address of your workstation, make sure the SQL instance has a root password -- then check everything is working with a command line MySQL client, e.g
[[Note: to verify your workstation's outside-visible IP address, use e.g a browser to visit a site such as http://checkmyip.com/ ]]
$ mysql --host=INSTANCE_IP --user=root --password
and once everything is set up properly you just follow the instructions at https://cloud.google.com/appengine/docs/php/cloud-sql/#PHP_Using_a_local_MySQL_instance_during_development :
To connect to a Cloud SQL instance from your development environment,
substitute "127.0.0.1" with the instance IP address. You do not use
the "/cloudsql/"-based connection string to connect to a Cloud SQL
instance if your App Engine app is running locally in the Development
Server.
If you want to use the same code locally and deployed, you can use a
Special $_SERVER keys variable (SERVER_SOFTWARE) to determine where
your code is running. This approach is shown below.
So for example if your Cloud SQL's IP address is 12.34.56.78, you'd use
$sql = new mysqli('12.34.56.78:3306',
'<username>',
'<password>',
<database-name>
);
when $_SERVER['SERVER_SOFTWARE'] is not set or does not contain Google App Engine (which means you're running on the local development server).
https://cloud.google.com/appengine/docs/php/cloud-sql/#PHP_Using_a_local_MySQL_instance_during_development
The Guestbook example above shows how your application can connect to a Cloud SQL instance when the code runs in App Engine and connect to a local MySQL server when the code runs in the Development Server. We encourage this pattern to minimize confusion and maximize flexibility.
Now that I've deployed my webapp to Heroku, how would I be able to browse the database as it's altered over time?
Try heroku pg:psql. For instructions for how to do this, see this.
If you want to browse your Heroku PostgreSQL database using a browser there is now a free tool for that called Heroku Data Explorer:
https://datazenit.com/heroku-data-explorer.html
It uses Heroku API in real time so your data/credentials stay secure and private. Also it has excellent performance because Heroku local network is used for database connections.
Download PgAdmin 4 and configure your heroku database credentials. Right click on Servers link and choose create >> server. On General tab give Name as per your wish and on Connection tab enter Hostname/address, address, Maintenance database (database name), Username and password which is given in Heroku dabase credentials page. And you will be able to access heroku dadabase on UI free of cost.
I use a tool called Adminer to connect to the DB. The problem is that Heroku will change the credentials for the DB occasionally. You can find them by visiting the Resources tab on your Dashboard then clicking on the DB you use.
It will take you to the Addons page in another tab. Click on the Settings tab then View Credentials.
Using these credentials, you can use Adminer to login to the DB.
Install Beekeeper Studio. Connect to POSTGRES_URL of Heroku with "SSL" enabled.
Easy to view
I have WebMatrix version 1. I made a WordPress site and now it's time to publish it. From what I've read, the best option is to publish the site from web matrix using the web deploy option. But my hosting (godaddy) doesn't support this feature. So I have to upload my site via FTP.
The problem is that I don't know how to export the databse from my webmatrix to my hosting.
From reading some posts, I think the best option is to use phpMyAdmin, but I couldn't install it on my computer.
Is that the easiest way to expot my database?
And if that is the best option, can anybody explain me how to install phpMyAdmin on my computer.
Thanks a lot
Gonzalo
Use the plugin http://wordpress.org/extend/plugins/portable-phpmyadmin/ to run phpmyadmin and export the database without actually installing phpmyadmin on your PC.