2023年2月18日 星期六

mysql 遠端登入

CREATE USER 'username'@'192.168.0.5' IDENTIFIED BY 'password'

username 你要創建的帳號 password 密碼 192.168.0.5 改成本機ip

GRANT ALL PRIVILEGES ON db_name.* TO 'username'@'192.168.0.%';

db_name 你要連的db

192.168.0.5 ifconfig cmd

mysql設定

nano /etc/mysql/mysql.conf.d/mysqld.cnf

bind-address = 127.0.0.1

修改成你的主機ip

bind-address = 192.168.1.20

重啟mysql service mysql restart

mysql -h 192.168.1.20 -u account -p

本機連線成功即可再試遠端主機 account是你剛剛創建的帳號

2023年1月6日 星期五

php jit

 

; Enable Zend OPcache extension module
zend_extension=/usr/lib64/php/modules/opcache.so

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1opcache.so

2018年9月16日 星期日

Qt

MariaDB


sudo cp /opt/lampp/lib/libmysqlclient_r.so.18 libmysqlclient_r.so.16

sudo apt-get install libqt5sql5-mysql

2018年5月23日 星期三

build OpenCV with OpenGL 在windows10上

1.安裝CMake for windows
2.download OpenCV source
3.建立C:\opencv3
4.建立sources和build資料夾
5.把OpenCV的檔案搬到sources下
6.Configure
7.勾選BUILD_EXAMPLES,WITH_OPENGL'
8.generate
9.用Visual Studio 2017 compile
10.
char files[10];
sprintf(files,"E:\\fire.avi");
 

    cv::VideoCapture cap;


cap.open(files);

11.cmd>opengl-example-opengl_interop.exe
12


OpenGL參考
Windows SDK which includes OpenGL and GLU (OpenGL Utility). The Visual C++ 2010 Express bundles the Microsoft Windows SDK, which would be installed in "C:\Program Files\Microsoft SDKs\Windows\v7.0A". (Otherwise, you need to download and install the Windows SDK separately).
The followings are used from Windows SDK:
  • gl.hglu.h: header for OpenGL and GLU in directory "C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\gl".
  • opengl32.libglu32.lib: libraries for OpenGL and GLU in directory "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib".
  • opengl32.dllglu32.dll: dynamic link libraries for OpenGL and GLU in directory "C:\Windows\System32". This directory is to be included in PATH environment variable.
你可以把它放在與exe檔在一起