1. 下載mysql image
# docker pull mysql:8
2. 查看目前的images 有哪些
# docker images

helloworld 發表在 痞客邦 留言(0) 人氣()

# mysqldump -h mysqldb -u root -p information_schema
mysqldump: Got error: 1044: Access denied for user 'root'@'test' to database 'information_schema' when using LOCK TABLES
解決方式
加上 --single-transaction
或是 --skip-locl-tables 參數

helloworld 發表在 痞客邦 留言(0) 人氣()

在 PXC 的環境中,如果 replication 失敗的時候,會在 mysql 的目錄下產生檔名為 GRA_*.log 的紀錄
例如,有一個sql 指令是要移除一個 table ,但是 table 不存在... 等
要如何檢視 GRA_*.log 

helloworld 發表在 痞客邦 留言(0) 人氣()

參考資料:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
# import the MongoDB public GPG Key
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

helloworld 發表在 痞客邦 留言(0) 人氣()

參考資料:
https://www.postgresql.org/download/linux/ubuntu/
PostgreSQL是開源的物件-關聯式資料庫資料庫管理系統,在類似BSD授權與MIT授權的PostgreSQL授權下發行。

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
錯誤訊息:
[Fri Jun 11 13:48:51 2021] [error] [client xx.xx.xx.xx] FastCGI: server "/usr/local/sbin/php-fpm" stderr: PHP message: PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1370 execute command denied to user 'user1'@'192.168.0.%' for routine 'mydatabase1.myprocedure1'' in /var/www/html/xxx.php:88, referer: http://myip.pass.tw/example.php
解決方式:
GRANT EXECUTE ON PROCEDURE mydatabase1.myprocedure1    TO 'user1'@'192.168.0.%';
flush privileges;

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
# mysqldump -h 10.1.1.100 -u root -p mydb
Enter password:
-- MySQL dump 10.13  Distrib 5.7.xx-xx, for Linux (x86_64)
--
-- Host: 10.1.1.100    Database: mydb
-- ------------------------------------------------------
-- Server version       5.0.xx-log

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
如果懶得查 log 到底是哪一筆 commit 出錯
可以用以下懶人排除法
SLAVE STOP;

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
環境:
CentOS 8.x
MySQL Server 5.x
在編譯的過程中出現以下錯誤
mysqld.cc:6503:1: error:narrowing conversion of 「18446744073709551615」 from 「long unsigned int」 to 「longlong」 {aka 「long long int」} inside { } [-Wnarrowing]

helloworld 發表在 痞客邦 留言(0) 人氣()

mysql error log 顯示以下訊息
210203  9:20:44 [ERROR] /usr/local/mysql/libexec/mysqld: Table './mydb/mytable1' is marked as crashed and should be repaired
210203  9:20:44 [Warning] Checking table:   './mydb/mytable1'
解決方式
# mysqlcheck -u root -p --repair mydb mytable1

helloworld 發表在 痞客邦 留言(0) 人氣()

undefined
修復 mysql replication 失敗筆記
因為 master 資料庫無預警電源異常
導致 mysql 主從同步失敗

helloworld 發表在 痞客邦 留言(0) 人氣()

當你還有舊版mysql server 需要維護
用 phpmysqladmin 登入時,卻出現 "您應升級到 MySQL 5.5.0 或更新版本" 
先確認一下 mysql server 版號
進入mysql ,輸入以下sql
SHOW VARIABLES LIKE "%version%";

helloworld 發表在 痞客邦 留言(0) 人氣()

1 2 3 4
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。