1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-14 12:38:01 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
jbranchaud
0dc97cbbcb Add Execute A Command From The Workspace Root as a pnpm TIL 2022-09-29 09:30:18 -05:00
jbranchaud
23881d2251 Add Default Username And Password For New Instance as a MySQL TIL 2022-09-26 20:02:08 -05:00
3 changed files with 58 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1245 TILs and counting..._
_1247 TILs and counting..._
---
@@ -43,6 +43,7 @@ _1245 TILs and counting..._
* [Netlify](#netlify)
* [Next.js](#nextjs)
* [Phoenix](#phoenix)
* [pnpm](#pnpm)
* [PostgreSQL](#postgresql)
* [Prisma](#prisma)
* [Python](#python)
@@ -520,6 +521,7 @@ _1245 TILs and counting..._
### MySQL
- [Default Username And Password For New Instance](mysql/default-username-and-password-for-new-instance.md)
- [Display Output In A Vertical Format](mysql/display-output-in-a-vertical-format.md)
- [Doing Date Math](mysql/doing-date-math.md)
- [Dump A Database To A File](mysql/dump-a-database-to-a-file.md)
@@ -551,6 +553,10 @@ _1245 TILs and counting..._
- [Specifying The Digest Directory](phoenix/specifying-the-digest-directory.md)
- [Specifying The Server Port](phoenix/specifying-the-server-port.md)
### pnpm
- [Execute A Command From The Workspace Root](pnpm/execute-a-command-from-the-workspace-root.md)
### PostgreSQL
- [A Better Null Display Character](postgres/a-better-null-display-character.md)

View File

@@ -0,0 +1,21 @@
# Default Username And Password For New Instance
Let's say you've set up a fresh new instance of MySQL. Perhaps in a docker
container with a MySQL image. When you first connect to the instance, you'll be
prompted for a username and password.
What is the username and password for a MySQL instance you've just created?
There are defaults. The default username is `root` and the default password is
left blank.
So, your connection URL will look something like this:
```
mysql://root@localhost:3306
```
You can use that on the CLI or plug it in to the connection details panel of
your favorite SQL client.
[source](https://dev.mysql.com/doc/refman/8.0/en/default-privileges.html)

View File

@@ -0,0 +1,30 @@
# Execute A Command From The Workspace Root
[`pnpm`](https://pnpm.io/) is designed to work with monorepos. In a monorepo
project you'll have a root `package.json` (in the top-level directory of the
repository) as well as individual `package.json` files per app and package. If
you're working from within the directory of one of your apps and you invoke a
command, `pnpm` should execute that command for this app. The `pnpm` CLI does
give you control to execute the command from the workspace root instead if
you'd like.
A likely setup is that both your root `package.json` and your individual app
`package.json` files have a `build` command.
Invoking the build command from `apps/my-app`:
```bash
pnpm build
```
will run the `my-app` build command, as specified in its `package.json`.
You could instead throw in [the `--workspace-root`
flag](https://pnpm.io/pnpm-cli#-w---workspace-root).
```bash
pnpm --workspace-root build
```
This will ignore whatever subdirectory you are in and invoke the `build`
command defined in your top-level `package.json` file.