Category: ‘技術情報’

PostgreSQL DB変更

2023年6月12日 Posted by PURGE

\c databasename

PostgreSQL start/stop/restart(Mac)

2023年6月12日 Posted by PURGE

$brew services start postgresql
$brew services stop postgresql
$brew services restart postgresql

Postgresql でユーザ作成

2023年6月8日 Posted by PURGE

postgres=# create user ***_user with password '******';
CREATE ROLE
postgres=# grant all privileges on database ***_db to ***_user;
GRANT

postgres ユーザで操作する。

2023年6月8日 Posted by PURGE

$ psql postgres
psql (14.8 (Homebrew))
Type "help" for help.

postgres=# 

PostgreSQL の再起動(Mac)

2023年6月8日 Posted by PURGE

$ brew services restart postgresql
Warning: Formula postgresql was renamed to postgresql@14.
Stopping `postgresql@14`... (might take a while)
==> Successfully stopped `postgresql@14` (label: homebrew.mxcl.postgresql@14)
==> Successfully started `postgresql@14` (label: homebrew.mxcl.postgresql@14)

Dockerfile mysql:8.0

2021年10月5日 Posted by PURGE

FROM mysql:8.0

ENV MYSQL_DATABASE=project \
  MYSQL_USER=root \
  MYSQL_PASSWORD=root \
  MYSQL_ROOT_PASSWORD=root \
  TZ=Asia/Tokyo

COPY my.cnf /etc/mysql/conf.d/my.cnf
RUN chmod 644 /etc/mysql/conf.d/my.cnf

Dockerfile python3.9-buster

2021年10月5日 Posted by PURGE

FROM python:3.9-buster

COPY . /project/

RUN apt-get update -y
RUN apt-get install -y libmariadb-dev gcc libc-dev cron vim

WORKDIR /project/backend

RUN pip install --trusted-host pypi.python.org -r requirements.txt

#CMD ["uvicorn", "project:app", "--host", "0.0.0.0", "--reload"]

Python import / from の関係

2021年9月2日 Posted by PURGE

Fatal error: require(): Failed opening required ‘C:\xampp\htdocs\ec-cube4\var\cache\prod/doctrine/orm/Proxies\__CG__EccubeEntityMasterWork.php’

2020年11月18日 Posted by PURGE

EC Cube4で、管理画面とユーザ画面ともに、表題のエラーが発生した。キャッシュをクリアしようと思ったが、管理画面がこのような状態なので、にっちもさっちも行かなくなった。そこで、コマンドラインからキャッシュをクリアする。

>php bin/console cache:clear

\bin\console’ は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。

2020年11月18日 Posted by PURGE

PHPコマンドとして、php から実行すること。

>php bin/console c:c