1. 下載mysql image
# docker pull mysql:8
2. 查看目前的images 有哪些
# docker images
helloworld 發表在 痞客邦 留言(0) 人氣(4)
# 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) 人氣(85)
在 PXC 的環境中,如果 replication 失敗的時候,會在 mysql 的目錄下產生檔名為 GRA_*.log 的紀錄
例如,有一個sql 指令是要移除一個 table ,但是 table 不存在... 等
要如何檢視 GRA_*.log
helloworld 發表在 痞客邦 留言(0) 人氣(26)
參考資料:
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) 人氣(56)
參考資料:
https://www.postgresql.org/download/linux/ubuntu/
PostgreSQL是開源的物件-關聯式資料庫資料庫管理系統,在類似BSD授權與MIT授權的PostgreSQL授權下發行。
helloworld 發表在 痞客邦 留言(0) 人氣(39)

錯誤訊息:
[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) 人氣(237)

# 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) 人氣(45)

如果懶得查 log 到底是哪一筆 commit 出錯
可以用以下懶人排除法
SLAVE STOP;
helloworld 發表在 痞客邦 留言(0) 人氣(18)

環境:
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) 人氣(87)
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) 人氣(21)