$ mysql -h 127.0.0.1 -P 33060 -u root -p -e "CREATE DATABASE running-laravel-on-gcp ” In my case, I need to specify the port number 33060. $ mysql -h 127.0.0.1 -u root -p -e "CREATE DATABASE running-laravel-on-gcp ” The CSQL is empty right now, let’s create a new database. cloud_sql_proxy -instances=running-laravel-on-gcp:asia-southeast1:running-laravel-on-gcp=tcp:33060 Create a database In my case, I connect with port number 33060. If you have a local database which is running on the port number 3306, you can connect with another port number. cloud_sql_proxy -instances=running-laravel-on-gcp:asia-southeast1:running-laravel-on-gcp=tcp:3306 Connect to the CSQL instance via the proxy client.Follow the guide here to Install the proxy client on your local machine.To connect to the database, you connect the CSQL by using the Cloud SQL Proxy. The beauty of a cloud server is you can connect anywhere. There you go! You have created a new instance of CSQL. Fill up all the field then click the Create button.Create a project in the Google Cloud Platform Console.įirst of all, create a new instance of CSQL (Cloud SQL). ![]() Prerequisitesīefore you getting started, you need to prepare It matches my goal of running Laravel application on GCP with no-ops. With Cloud SQL, I don’t need to install MySQL manually or maintain the database. Cloud SQLĬloud SQL is a fully-managed database system that supports PostgreSQL and MySQL databases in the GCP (Google Cloud Platform). In this post, we are going to connect Laravel 5.7 application to the Cloud SQL. In the previous post, our Laravel 5.7 application lands on the GAE (Google App Engine) Standard Environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |