ユーザ用ツール

サイト用ツール


mysql

文書の過去の版を表示しています。


ubuntuにinstall

apt-get install mysql-server mysql-client

ちなみにuninstall

apt-get purge mysql-server mysql-common

設定

セキュリティ設定ツール(rootパスワード等)

sudo mysql_secure_installation
sudo mysql -u root

設定ファイル(/etc/mysql/mysql.conf.d/mysqld.conf)

character-set-  = utf8

bind-address = 

backup

$ mysqldump -u root データベース名 > dump.sql

オプション

  • –add-drop-table
  • –no-create-info (-t)
  • –no-data (-d)

restore

$ mysql -u root データベース名 < dump.sql 

create database

db作成

create database xxxxdb;

ユーザ作成

create user 'xxxxid'@'localhost' identified by 'xxxxpass';

ユーザにDB権限追加

GRANT ALL on xxxxdb.* to 'xxxxid'@'localhost' identified by 'xxxxpass';
mysql.1599150531.txt.gz · 最終更新: 2020/09/04 01:28 by nabezo