-1

I'm trying to upgrade from Craft CMS 3 to Craft CMS 4 and am running into some issues.

I am trying to migrate my project in Craft 3 from using MAMP Pro to ddev and had some success in the start. I have Docker Desktop installed on my Mac, and have ran some commands in the terminal following the videos on Craft Quest to set up Craft CMS with ddev.

The problem is that my webpage is not showing up in the browser. I suspect this has something to do with the database connection. The default: server, user, database password, and database name, in the .env file is all being automatically configured as "db". This is normal since I used the ddev config --project-type=craftcms command when creating the project with ddev.

The problem is my website files can't connect to the database with the new .env user and database credentials.

I also suspect that the main issue is that when I'm using the trial version of TablePlus, for some reason that software is not letting me create a new user with permissions for my database.

I suspect that since I'm not able to create a new user with permissions for the database within TablePlus, this is likely the reason why my webpage is not loading properly. Since the web files would have trouble connecting with the database, and there isn’t a user with permissions granted to access the database.

Does anyone here have experience with TablePlus? Can you help me navigate this database software of TablePlus and help me find a way to add a new user for the database that is set up with ddev?

Any advice is appreciated. The reason why I'm keen to use TablePlus is because it is tightly integrated with ddev.

I tried to set up ddev in the terminal, I got the hidden ddev files set up in my local directory. However when I run the command: ddev start and go to my url on my local server, I get an HTTP 503 – Service Unavailable error message. I'm not sure exactly what is causing this error.

I would appreciate some advice, thank you.

  • 1
    If you run into problems migrating an off the self product, then you need to contact the supplier / developer for support. – Shadow May 31 '23 at 21:15
  • 503 usually means you don't have the docroot set right. Docroot is where your index.php is. – rfay Jun 01 '23 at 01:24
  • I contacted TablePlus, they say it's not a problem with their software. They suggest to add an admin user and make sure I "FLUSH PRIVILEGES" at the end. They didn't add any other information, however when I looked up an article on how to create a superuser in MySQL, I came across this: https://tableplus.com/blog/2018/10/how-to-create-a-superuser-in-mysql.html – SebastianN Jun 01 '23 at 13:28
  • This is also a helpful resource for others encountering the same problem: https://laracasts.com/discuss/channels/laravel/access-denied-for-root-at-localhost – SebastianN Jun 01 '23 at 13:42

1 Answers1

0

you have a number of things going on and have to take them one at a time.

First, for Craft 3, you'll want to use the php project type in DDEV. The craftcms project type is optimized for Craft 4. After you get your upgrade going, you can switch it. Because Craft 3 has very free-form configuration options, the .env file created by DDEV may not be optimal (or correct).

Second, the database details for the default database in DDEV are hostname: db, database: db, username: db, and password db. You want to configure those manually wherever your site wants them.

To import into the default database, use ddev import-db. For example, ddev import-db --src=/path/to/mydb.sql.gz

Now, for TablePlus: It has nothing to do with any of the stuff we're talking about. It's a database browser, and if you have it installed and you use ddev tableplus it will automatically come up connected to the default db databased. You don't even need tableplus for anything at all. But once you have your project working, you can use it to browser your database.

rfay
  • 9,963
  • 1
  • 47
  • 89